This draining soap dish is designed to fit into a built-in shower shelf, but it should work for most needs.
It has a depth of 95 mm / 3.75 inches.
You can add some adhesive putty or something similar on the back to help hold it in place when you grab the usual sticky piece of soap, but we just squeeze it from the front and it works well enough for us.