If your screen or monitor resolution is less than 3840×2160 in either dimension, then the Apple TV app will use the 1080p stream at best.
If you use the web interface [1], then that will use the 1080p stream at best.
Both these limitations apply to any platform.
I am connected to 4K TV via HDMI
Depending on the HDMI ports (computer and TV), optional adapters, and cables, HDMI itself might be a limiting factor: Commercial 4K content requires HDMI 2.0 or later with HDCP 2.2 or later. The HDMI port on the 4K TV may need configuration for high bandwidth use. HDMI 2.0 or later ports would benefit from HDMI cables rated for 18 Gbps or more.
Apple has not publicly stated if the Apple TV app on Windows is a limiting factor for resolution.
Apple TV app user guide for Windows - Apple Support