They are not able to share that code now because licensing the code in a way that it cannot be shared is currently a viable business model for Unreal and Unity - that would change with the proposed law and the middle ware providers will be forced to adopt different terms if they want to continue existing.