This is correct, they released the source code a couple years ago under a reference license.
https://blogs.unity3d.com/2018/03/26/releasing-the-unity-c-s...
https://blogs.unity3d.com/2018/03/26/releasing-the-unity-c-s...
At least that was the case around 2018. It might be getting better as Unity is migrating away from C++.