Things worked out as Abraham had expected, and he was indeed treated well. Moreover, he gained more sheep and cattle and other goods. However, when we sin we become a danger to others not just to ourselves. So it was with Abraham and Pharoah. For the Lord inflicted various diseases on Pharoah's household. Pharoah told Abraham to leaver with all his goods and his wife.
In all this Pharoah comes out of it more honourable than Abraham does. Yet God still protected Abraham. This has some lessons for us in our attitude to Israel. We can sometimes look at Israel and be appalled at some of the things she does (equally we should be aware that the news media sometimes distorts the news and can sometimes have an anti-Israel agenda, but even so Israel is by no means perfect). However, this does not mean that God will remove His protection from her, nor that nations that mistreat her do not put themselves in a place of danger. Israel does indeed need to change, and will only find salvation when she comes to recognise Jesus as her Messiah, but in the meantime we should still treat Israel with respect.