H.264/AVC
is not limited for 4K in terms of max resolution as it supports DCI 4K
(4092x2160) @ 60 fps at Level 5.2. For example Sony already uses XAVC which is exactly 4K AVC.
For a while the max level was 5.1 and 5.2 was introduced later. If needed new levels can be introduced as long there's the hardware to support it.
For eg. the Nvidia NVEC supports H.264 up to 4096x4096: https://developer.nvidia.com/sites/default/files/akamai/cuda/files/CUDADownloads/NVENC_AppNote.pdf
The actual problem with 4K are the bandwidth requirements for streaming, not the hardware support. To do 4K streaming at 12-15 Mbps the encoder needs a 40% efficiency increase.
The problem with H.264
is that it's not efficient enough for this purpose. This is what the new H.265/HEVC (High Efficiency Video Coding) tries to achieve.