I have an Android head unit in my car, without internet connectivity. When my old phone (Galaxy S9+, /e/OS 1.17) connects to the head unit via bluetooth, a System Profile runs which turns on the Portable Wi-Fi Hotspot and turns off Wi-Fi. When the bluetooth disconnects, Wi-Fi comes back on and the hotspot turns off.
I've seen a similar facility called "Modes and Routines" on another Samsung device.
Is there a similar feature in GrapheneOS?