Why does using a variable make a difference in performance?
Sometimes yes it's good to use statics.  In this case the SQL Server doesn't know what the value is in the variable when it's creating the plan so it's escalating to a table lock I'm guessing.  You could force the locks to be row locks on the delete statement which should fix the problem.