Last year I had a problem with the cheap valves they give you. I "closed" the bypass valve. The handle moved to close, but it didn't really close. The water heater would heat up the water in the hot water line for a foot or so, then when I turned on the hot water at the sink, I'd get a few seconds of hot water and then it would get cold. Sounds like the issue you're having. The valves in the pics above look a lot better quality than mine.
1988 Coleman Sequoia - popup (1987-2007)
2012 Roo19 - hybid (2012-2015)
2016 Mini Lite 2503S - tt (2015 - ???)
2011 Traverse LT, 3.6L, FWD
2009 Silverado Ext Cab, 5.3L, 4x4, 3.73
2016 Silverado 2500HD Dbl Cab, 6.0L 4x4, 4.10