They don’t even need to go full FOSS, they can just opt for source-availability to be a bit more competitive with Unreal Engine.
One of the things devs like about Unreal is that the entire codebase is just there to look at, so you can debug any bugs yourself and even add features to the engine that you specifically need for your game. Meanwhile Unity is a black-box blob that you can’t neither debug or extend, and all you can do is yelp in the bug tracker or the forums to get unnoticed.