Recently ran into this, and my issue sounds the same, if I passed my subroutine the parameter 4, then it created a variable 4 and assigned the variable '4' the value =4.
Not sure if it was always this way, but when I always single quoted the variables being passed as parameters in the call statement, while making sure no quoting was used in the receiving subroutine, this issue did not occur.
Sub MyProc(var1NoQuotes, var2NoQuotes)
Even though my hardcode parameter of 4 was going to the subroutine in quotes, I think by default I was still able to work it as a number, without requiring a data type conversion like Num() or Num#().
I remember some years ago to read some discussions about the topic and what the technical backgrounds could be and if it should be considered as bug or not - I believe the conclusion was it's not a bug else an intended feature.
Because it's not easy to find these old postings I didn't try it yet - particularly because it's just an explanation and not a solution in your case. I think the only solution would be to drop the variables within the routine (or maybe within some additionally routines) after using them. Just var = null(); will delete the variable (only within the script - does the variable already exists within the GUI they must be deleted there first).