By default a parameter is a copy. BYREF is the exception, and using it by accident changes the caller’s variable.
Zero sets its parameter to 0. The caller should still hold 5.
The parameter is passed BYREF, so the caller changes. Pass it by value instead. Output must be 5.
Leaving the keyword off is by value. BYVAL is how you say it on purpose, including after a BYREF earlier in the same list.