There are several ways to do that. I made two examples.
The first uses the Sine-behavior. You have to put your enemy in the middle of the platform and set the magnitude in the sine behavior to half of the length of the platform. The advantage of this is you can set you enemy where you want, even in the air.
The second uses the Platform-behavior. You have to use two invisible sprites as markings to know where you enemy has to make the turn. I think that one is easier to understand.
drive.google.com/file/d/1lXrsgIF93Luk3dbr_btuu-3LKrvWXo3w/view