Do you mean that the water turns cold after a few minutes, or do you mean
that the water stops flowing entirely from the hot side?
If you mean water gets cold prematurely, then perhaps the dip tube has
broken. The dip tube is a piece of tubing that takes the cold water coming
into the tank, and takes it toward the bottem. It's inside the tank;
naturally you can't see it. If it breaks off, then the incoming water will
just flow directly over to the hot outlet without being heated properly.
It's not uncommon, and the plumber you had should have figured it out.
Since you have an electric water heater, what you describe sounds like an
upper element being burned out. You said the plumbers already ruled this
out, but I already have my suspicions.
A third, remoter possibility is that there's a cross connection somewhere
that's allowing the cold side to mix with the hot. Washing machines and
single handle faucets and sometimes produce this.