The real problem is that ICOM has refused to release the details of protocol used for data communication over the digital cable used when the radio is in Terminal or Access Point Mode. Open source programmers are left to their own to figure out how things work. I will NEVER understand why they won't release technical information that will only help them sell more radios.
But at least I have learned a little more and have come up with a work-around, but I'm not sure if it will help you or not. What I have found is that you have to unplug and replug the digital cable to get qnitap to start up properly if you are going to be shutting Terminal or Access Point Mode off and on. Please note that the discussion below is only appropriate with regard to changing the "DV Gateway" menu while qnitap is running.
If you look in the qnitap log, it will tell you when it has properly initialized communication on the digital port with a "ICOM radio is connected" message. If you disconnect the digital cable (and wait 10 seconds for the connection to time out) and then reconnect the digital cable, qnitap will successfully reconnect to the radio most of the time, but not all of the time. I think the reason it doesn't happen all of the time is because the radio may not properly receive the initialization packets, depending on when you happen to plug the cable back in. Remember that as long as the connection is not established, qnitap will quit after 10 seconds of no communication and then systemd will then try to restart it.
I have just pushed up a new version of qnitap, V#2.1.2, that will also send a voice message saying "Radio is connected". This way, you don't have to be watching the log to be able to know if the communications was properly initialized. So...
Ten seconds after you switch back to normal mode from either Terminal or Access Point Mode, qnitap will quit, and then the system will continuously try to restart qnitap approximately every 10 seconds. Unplug the digital cable while you are in normal mode. Then, when you are ready to go back to Terminal or Access Point Mode, just plug in the digital cable after you have entered the T/AP Mode. You should fairly quickly hear the "Radio is connected" message. If not unplug the digital cable, wait at least 10 seconds and then plug it back in.
Just one more thing. You may not hear the "Radio is connected" message on a cold boot. There is a lot going on with qngateway, qnlink and qnitap when starting cold. But, as long as qngateway and qnlink are both already running, you should hear the message when the communication is properly initialized.
Finally finally, I still think the safest way to handle this is to shut down RPi if you aren't using T/AP, then restart when you are ready to resume T/AP.