For anyone actually curious, I checked in more depth: you are not allowed to publish UE5 code itself. Any intellectual work you do using it, including assets and source code, is up to you and you can publish it freely.
Make sure to include proper license in your own repo if you would like to have your work protected in at least simple way :)