I play a lot of games on PC and I completely agree that DirectX 12 and Unreal Engine 4/5 are a bit of a mess of PC and have become the bane of PC gaming in recent years.
Take, for example, the recent Epic Mickey Rebrushed, which is an otherwise superb graphical update of the Wii classic running on Unreal Engine 4. On PS5, this game runs and plays like a dream with no issues at all. On PC, the game is a stuttery mess as the developers enabled DirectX 12 by default with no pre-shader compilation step. With that game you can force DirectX 11, which fixes 99.5% of the stuttering and that is exactly what I have had to do.
Even games like Dead Space Remake (which uses Frostbite) and Silent Hill 2 (which uses Unreal Engine 5) have stuttering on PC. The former is still unfixed on PC (despite the fact that the developers had third-party assistance to update the engine to support data streaming!) so the game has constant frametime spikes and massive stutters as you explore the games environments, that ruin any sense of immersion. The latter has now been patched to address the worse of its stuttering issues but on my PC the game still suffers from some traversal stutters, which are actually worse than the launch build as they can cause the game to stall for up to 15 seconds on my machine making it looks as if the game has crashed (my PC specs are i5-13600KF, 32 GB, RTX 4080 FE, Windows 11 Pro 24H2 with the game installed to my fastest Samsung 980 Pro NVMe M.2 SSD).
The games that run best on PC are usually those that do not use Frostbite or Unreal Engine but custom built engines. Alan Wake 2 and Cyberpunk 2077 are two great examples of PC games with cutting edge visuals that run well on my PC with everything maxed out and no stuttering. Horizon: Forbidden West and God of War: Ragnarok are two other games that run great on DX12 but neither of those use Unreal Engine.
I guess the issue is more Unreal Engine + DX12 then but it saddens me that Epic are not more proactive in supporting developers with the stuttering issues on PC in their engine. You would think they would be concerned that the engine is getting a lot of bad rep on PC. It is almost a meme at this point.