A person who dresses immodestly in public is trying to attract people's attention.
If you get upset about their inappropriate dress, then congratulations, they have succeeded in getting your attention. You are now thinking about their sexuality. Which is exactly what they intended.
They are trying to make a scene - in the most literal sense. Your best response, as is usually the case when people make scenes, is to make a point of just ignoring it.