Android itself without the proprietary crap added to it by Google is open source and will continue being so long it keeps using the Linux kernel. This is not going to change as the Linux kernel is licensed under GPL, and if you link against GPL licensed code your own code also has to be licensed under GPL.
The problem GrapheneOS has is not with AOSP going away, but with Google not publishing the device tree for their Pixel devices like they used to, making it impossible to unlock the bootloader, and generally making harder to develop a custom ROM for their devices.
The GrapheneOS team is currently working with an OEM to develop a phone that comes with GrapheneOS from the factory. If that happens and we no longer have to rely on Google hardware for installing it then the problem is solved.
You are not voiding any warranty. You can very easily revert back to stock if you need to.