The problem is you don’t have enough contact with the vise jaws on your stock. You might try machining yourself some vise jaws out a soft material, wood or plastic would do, so you can seat the stock all the way down and not worry about cutting into the vise itself. Make sure to set your retract height to clear the vise, and you should be good.
Here’s some examples:
Obviously you can adapt your design to your needs. Something as simple as a couple wooden rectangles to act as spacers would probably be ok, though if your stock must be perfectly square, I’d suggest HDPE or similar.
Failing that, you can try fixturing wax, or Nitto tape, which works very well. Tip: if using the tape, make sure to press down as hard as you can for about 30 seconds when setting up. Use a putty knife or paint scraper to release it - don’t pry, just push laterally on the tape under the stock, comes right up.