Normally I would just change the retract value in the cam so the tool moves higher up to avoid collision.
Easy way is to edit the gcode in windoes notepad.
Change the value of the retract height.
Unless your machine hasn't got the extra height needed?. This you don't mention.
If so. You may need to move Y or X past the stock instead. Then rotate. Then come back in.