Sounds like the soap dish was originally attached using a thin-set adhesive ..........You can scrape off all the old adhesive from the back of the fixture........and clean out some of the old mortar from the wall cavity........Use thin-set adhesive to replace the fixture........hold the fixture in place with tape until dry and finish with a bead of silicone caulk to seal the edges and keep out the water..........doug