Sunscreen isn't technically a liquid, and in DXB they won't cause problems with this. I just carried a 250 ml bottle of cream in hand baggage ex-KUL and the only issue at baggage screening was an empty bottle of water in my bag.
However the US is a completely different ballgame!