Trying to make moving platform in Godot 3

Godot Version

Godot 3.5.3

Question

Hi all,
I’m trying to figure out how to implement a good moving platform. But I have this issue that the player is “attached” to the platform when I jump under it as you can see in the gif:

ezgif-1-afc517430e

In the player script I’m not making any specific code run at is_on_ceiling().
I just move_and_slide_with_snap and I disable it when I jump.

You can try this issue in the level named “Test” here:
https://wootr0p.github.io/prototypes/traditional-platformer/

And you can look at the Player script here:

And at the moving platform code here:

image

How I can solve this issue in Godot 3?

Thank you in advance,
wootr0p