Transparent soaps contain synthetic detergents - commonly shortened to syndets. The syndets are able to foam up more and the different chemical structures may help a soap last longer. (I'm not a sciency-type and can't give specifics).
A well draining soap dish and keeping the soap out of water puddles will help a soap last longer, regardless of recipe. If there is a specific recipe you like we can help you tweak it to last longer or bubble more. Coconut oil makes a super bubbly bar but it doesn't last long in the shower. Adding another oil can help with longevity if that's your goal.