Does General Onimaru's Clockwork Soldier prevent retreats?
Yes, movement is treated the same regardless of how the pawn is moved. David Sirlin answered this question here:

Q: Onimaru's Clockwork soldier state that the opponent cannot move behind the token. Does it also prevents any retreat? Because the way I see it, your opponent has a &quot;wall&quot; that moves toward him 2 case per turn, but the wording of the card implies something else.
A: The movement rules are the same across the whole game. By &quot;movement,&quot; that means &quot;the rules for changing the position of your pawn for any reason, when it would reach an obstacle&quot; are the same across the whole game. It doesn't matter if the &quot;movement&quot; is a move, push, dashing strike, retreat, etc. It doesn't matter if the obstacle is a player pawn, the edge of the board, or a clockwork soldier. In all cases, you go as far as you can, then stop when you reach the obstacle.