Before Catalina, you could do pretty much anything you wanted to the drive contents. In Catalina, it's more difficult but can still be done.
In Monterey, Ventura or Sonoma, you can't touch the system. I tried it on both a 2018 Intel mini, and an M2 mini Pro. Both running Sonoma.
I disabled SIP, which you can do on both. But, you can't mount any drive to modify it. Trying the old command…
mount -uw /
…produces a message that this old command cannot be used. So I tried a current command…
mount /dev/disk3s9
…with disk3s9 being a specific drive division of many you can get with a diskutil list command. I tried mounting the system drive, the user data drive, and even an unprotected volume with nothing on it but my personal stuff. The result was always the same message:
invalid special file or file system
Trying to invoke sudo does nothing. You get the message:
command not found
So, if you're using Monterey or later, there's nothing to concerned about at all.