GrapheneOS says Google is making life harder for rival operating systems and devices
(www.androidauthority.com)
Root access is tricky because it can be less secure overall but I guess this is dependent on your use case.
I think you can still do it but you have to edit the rom beforehand so yeah not out of the box.