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.