Tried to duplicate but I could not. It lets me mix parameters and hardcodes fine (both with and without BypassPrepare).
Are you sure the variable holds the value you want (it can't change at runtime)?
In the meantime, if you can get it going with all params, you may as well do that (or maybe use an expression to build the command so there is no parameter).