Thanks Rich for giving me some direction. I couldn't get Rich's solution to work for me directly, but this little hacky bandaid will do for now until I get some time to look into this. If anyone else experienced this bug I would love to know, especially if you solved it more directly. I took the script number function from another stackexchange answer here
Ignoring the context, the answer to your "short question" is that you can't (easily) call it from your own function.
You can find out what function - invokes in netrw by entering the following command in a netrw buffer:
:verbose nmap -
For me, the output contains this function call:
But what is <SNR>?
Yang-Le Wu (yangle) works around the problem by using keybinds to switch buffer. See the commit linked from the issue:
The keybinds call a function which will remove the first netrw buffer, if found, before attempting to do the actual movement.
Without the first buffer ...