Pyrethrin might work but it is not a gas and might not get to the bugs living deep inside the tree , C02 would get everywhere even inside termite/borer tunnels due to this being the atmosphere inside the bag.
I don't know how effective this would be and have not tried it, I have only heard one person talk about this in real life ( a weed grower who recons he killed a spider mite infestation with dry ice, the guy was baked and was highly likely talking s**t).
There are other more reputable papers/evidence that this may be possible for example the link in my first post, that's why the mental in experimental was in caps as we all know
@Cajunrider loves an back yard experiment