Backslash changing into slash with serial communication

I’m trying to code an experiment using PyshoPy (PsychoPy 2022.2.5) using the serial communication. I code this experiment using the Builder and the Serial object.
The problem is that I need to send a carriage return to the Arduino I’m connected to at the end of each instruction. So in the ‘Start data’ parameter of the serial object, I wrote : ‘my_command\r’ but I didn’t work, the arduino did nothing. So I did a little digging in the compiled code and I found that PsychoPy automatically convert my backslash ( \ ) into a simple slash ( / ). So in the Builder I have for example : ‘setvalve 1 \r’ and when I look at the compiled code I have : ‘serialPort.write(bytes(‘setvalve 1 /r’, ‘utf8’))’.
I tried to add $chr but it didn’t work as well so now I’m stuck with this problem …
Thanks for your help !