Moving platform player bounce when moving down

I have this moving platform(moves up and down) but everytime the player gets into that platform the player sort of like bounces when the platforms moves downwards

on the red arrow, you can see the player and the platform has a gap when platform is moving downwards. Is there a way to fix this?

You can attach the player to the platform (on platform touch).
Detach player if he not collide with platform.