UE4 isn’t open source. You get source access with the license but it’s quite restrictive on what you can actually do with it. If you tried to setup a competing engine based on a fork of it you would quickly find yourself being sued.
Godot would be an example of an open source game engine.