Previously with earlier Apple Silicon Macs (my old M2 Max for example) if macOS refused to render cleanly at 4k you could use a tool like BetterDisplay or RDM to override the scaling and enable high DPI mode at 3840x2160 - that no longer appears to be an option on the latest M5 Macs and you're stuck at 3.3k~ (3360x1890).
*Note: Editorialised the title slightly to make it more descriptive of the limitation.