Seems to me that a rudimentary hardware approach might be easier and more sensible.
?
Find switched +12 volts from the IC-9700 and use it to turn on a relay to open PTT between the sound card and the aprs transmitter. While the 9700 is powered up, the aprs transmitter will not key. Thus, problem solved.? No TX, no noise.
?
Of course, relays are old fashioned. Replace it with some sort of solid-state switch.
?
FYI, assuming that we are talking about aprs on 144.39 and weak signal on 144.200, it seems to me this issue is a basic problem of transmitter sideband noise overloading the weak signal receiver 190 KHz away. It has nothing to do with SWR. Keep in mind that the typical 2m repeater has 600 KHz of spacing and requires a serious duplexer to support this spacing. Cut that frequency spacing into a third, and the problem becomes more difficult by an order of magnitude. So, simply keeping the aprs transmitter from transmitting while the 9700? is turned on is a simple and cheap fix for the problem at hand. Among other things, in the software approach, if you stop direwolf from running, you don't have to figure out when to restart it.
?
73, Mark, N2MH