Gas water heater venting

Is there a minimum distance an elbow can be installed above the draft diverter on a gas water heater, (example, 4" flue pipe would require 4 inches of pipe before an elbow.)

Not that I am aware of. Just required to be as “straight” and “short” as practical, while maintaining proper rise/slope.

When installing we used minimum 12 to 18" as a rule of thumb, and higher is better.
My code book (old) also says horizontal runs should be kept as short as possible, so a vertical rise with a near horizontal run to the chimney is shorter than an elbow adjusted to 45 degrees on the draft hood and an angled run to the chimney. Personally, I would not say too much about an elbow a short distance from the draft hood if that was the best the installer could do given the difference between the height of the water heater and the chimney, but I might say it was poor installation practice if the installer had plenty of room for a vertical rise before using an elbow. I would also look carefully for more screw ups, as indications are the installer did not know or care about what they were doing.