So, I tried the pin/unpin approach and it partially worked. The player did, in fact, move along with the platform and I was able to move while on the platform.
However, seems like the player's speed is reduced and for some reason, the platform only moves the player if its sprite is on one of the edges.
For example: if the player is moving from left to right, the platform will only move the player when the latter is at the left edge of the platform, meaning that the platform will move without the player until the player hits the left edge, and only then the player will move with the platform. From right to left, the opposite is true.
Any clue on what could be causing that? I know that in the screenshot I am using a boolean to pin the player to the platform, but I also tried checking for the movement keys not being pressed and it didn't work.
Code screenshot:
Game screenshot: