H.264 Max Resolution
One of the bits of information associated with a H264 stream is its level. The level informs the decoder the computational resources needed for a successful decode. Turns out that the highest level 5.2 supports upto 9437184 luma samples per frame, which is the number of luma samples needed for a frame of size 4096x2304. So, there may be encoders that can (be forced to) encode higher resolutions but there's no valid level which can be set for the stream, and probably no decoder that can be guaranteed to produce reliable playback.