

I tried UE5 on Debian Testing and it seemed to work fine.
If it works there, it’ll probably work on almost anything.
Personally, I dislike Ubuntu, but if it’s been working for you, you shouldn’t have problems.
I really like Debian and think it’s not too difficult, but it isn’t for everyone and might not be your thing.
EDIT: Looking at the website for UE5, almost any distro released in the past 3 years should do the trick so long as the distro works on your hardware.
I second Debian Testing. The only issues I have are updates slow down during package freezes and sometimes, a package you are using becomes a victim of a package transition. Both are symptoms of Testing being exactly what it says, so I can’t blame them, but still a valid annoyance.
The worst example was FreeCAD had a dependency being transitioned, so FreeCAD disappeared from Testing for a while, meaning my system wouldn’t update if I wanted to keep FreeCAD. In the end, I just gave up and used the Flatpak. (I probably could have installed from Unstable, but whatever.)
Truth be told, I kind of wish there was a project to keep some new packages flowing to Testing users during freezes. I get why Debian themselves doesn’t do it - it would be a nightmare to maintain - but an outside community project would be amazing. It wouldn’t exactly be easy, but such a project wouldn’t need to necessarily do every package (just desired ones), and they would only need to maintain them a couple months until new versions start flowing into Testing again. I think the biggest difficulty is not going too far ahead of what will end up in Testing post-freeze.