Thoroughly clean off all of the soap scum and wait for the surface to dry (otherwise, the bond might fail). Apply a strip of foam tape on each mounting flange, stopping one inch short of the ends.
We may receive a commission on purchases made from links. It seems like no matter how hard you try, there will always be clutter in the shower. Whether it's a stray shampoo bottle, a bar of soap ...