Hi,
I just ran into a problem where a microcontroller gets rebooted because of the RTS and DTR signal togling while synaser is connecting to the microcontroller's serial port. The RTS and DTR signals are used to access the bootloader of the microcontroller. This issue and the solution was described here by someone else: https://forum.lazarus.freepascal.org/index.php?topic=63101.0
The mentioned solution does worked for me too.