Look, you can surrender your precious water bottle to security or the trash can, or you can beat airport officials at their own game. Take that!
I know, I get it. You don’t want to pay for an overpriced water bottle at a convenience store inside the airport. But you really don’t have to. Dump the water before you hit airport security (maybe in the bathroom?), and carry the empty water bottle with you to the other side.
Once you and Water Bottle have both safely made it through, you can quench your thirst by filling it up with water from the fountain. (Bottled water is no better than tap, anyways.) Though some countries may not have clean tap, a few have clean purified drinking water available for consumption near the gates.
Either way, you don’t have a choice.