edit: it doesn't unless Epic Games grants you a specific license to do that. https://www.unrealengine.com/en-US/eula/unreal
source:
> 4. How You Can Share the Licensed Technology When It Isn’t Part of a Product > You may only Distribute Licensed Technology (including as modified by you) outside of a Product as expressly permitted by this Section 4.
> a. Sharing of Engine Code
> i. Sharing Engine Code with Another Licensee You may Distribute Engine Code (including as modified by you) in Source Code or object code to a third party who is separately licensed by us to use the same version of the Engine Code that you are Distributing.
>Any public Distribution of Engine Tools (e.g., intended generally for third parties who are separately licensed by us to use the Engine Code) must take place through a marketplace operated by Epic such as the Unreal Engine Marketplace (e.g., for Distributing a Product’s modding tool or editor to end users) or through a fork of Epic’s GitHub UnrealEngine Network (e.g., for Distributing Source Code).
You can't do that for Godot either.
That is what all company selling proprietary products that include MIT and BSD licensed codes do. Usually the jist include a file called "third party copyright notice" with the product ad well as an entry in the "about" section of their gui.
If Unreal screws you, then you can fork it to build some features you need for your current project. If Godot screws you, then you can fork it to build some features you need for your current project, cooperate with others on the features they need which also help you, and start a community for Engine-formerly-known-as-Godot-v2 and invest in it as a thriving basis for projects 10 years down the road.