Probably !
I tried that spray on frost in a can once, and like you said, the water and heat in the bathroom made it peel off quickly.
Then I tried it on the OUTSIDE of the glass and it actually lasted about 3 years. That's because (I assume) there was a very wide roof overhang above the window so it never really got wet from rain.