Much like how aluminum foil keeps oxygen and moisture away from food, it does the same for soap, helping the bar dry faster and protecting the holder from messy build-up.
Fold a sheet of aluminum foil into a small square that is big enough to cover the holder, place the bar of soap on top, and continue to use it as usual.
The wet bar will still leave a soap scum mess that will continue to build up, but instead of adhering to the holder, the foil safeguard can just be replaced
To dry your soap faster, use a sheet of foil to wrap the bar. The foil will prevent the soap from just sitting in water when not being used and keep shower spray from hitting it.