The existing behaviour you describe is probably automatic in the m2 nano microcode, but the behaviour you want is explicitly controlled. So firstly you need to know that there are m2 nano control codes that allow you to turn this on or off.
Then there would need to be code in Meerk40t to actually turn these pins on/off.
I did find a post by Tatarise (the author of Meerk40t) from 5yrs ago (before he died) regarding this - so here are some URLs that might help: