How to delete a VM in pve, but retain it on pbs?

No, it won't. In fact, if you add a new VM with the same number, the old backups will show up under the "backup" tab of said VM.
So, what you want to achieve is standard behaviour.
 
I don't know a way to prevent that other than not assigning that id again upon creation of another VM.
It's just a number, so PVE and PBS are rather agnostic about the content.