How should I remove closed cell spray foam insulation which has shifted the framing?
That's the problem with splitting a plate but not under a stud. There should be a stud where your plate is cut. You have 2 options...


Dig out the insulation, lower 8 - 12 " or so, and drive the plate back in place then secure it to your slab.
Trim the plate as you've suggested. However, that's not really straight forward as your framing is now out of whack. Check to see if the stud to the right of the split in the plate is still plumb. It may need a "shave" too.