Welcome to the site. Steve has some good suggestions.
Does the water get cold suddenly or gradually? How high is your water heater temperature turned up?
As a general tip, its a really good idea to install a low flow shower head too. I really love my
earth massage 1.25GPM showerhead. That would give you twice as much time in the shower with hot water over a standard 2.5 gpm showerhead. Not that that should be the fix to your problem, just a general tip.