There's unfortunately not a way to do this automatically yet, but you can manually add a modifier for your node group with the example code in this comment:
https://github.com/BrendanParmer/NodeToPython/issues/170#issuecomment-3315155813
Does what it should, excellent.
Great add-on. What do I need to set to make my gn a modifier add-on? So it appears under add modifier?