I found one solution. I'll make a note of it for myself.
Suppose you want to press the D key to go right.
Prepare a object variable (eg "DirectionPlayer").
Prepare 4 Check Transform nodes to determine if the player's Rotate is 0, 90, -180, or -90.
In each case, set the value of DirectionPlayer to (1,0,0), (0,0,1), (-1,0,0), (0,0,-1) .
And in the Change Position node, use this DirectionPlayer.
I succeeded in doing what I wanted to do.
(The downside is that this method requires a lot of nodes.)
postscript
Again, it may not work.