When trying to walk up a staircase that is being retracted there is a high chance that you will fall through the staircase block. Creating this setup and continuing to hold forward when walking up the staircase will give the best results.
Observed Result:
You walk up the staircase and usually end up falling through the staircase
Expected Result:
You don't fall through the staircase and remain on top of it after it retracts
If this is still an issue, could you please attach the world to your report, on which the issue can be observed?