Dig a hole, place ladders going all the way down your shaft.
If you're looking at your ladder now, so it's dead center, place a trapdoor at the top of the ladder so that the hinge is anchored to a block on the right and covers the last ladder.
Open the trapdoor and climb down the ladder - hold shift to stop your descent.
In numerous attempts, I cannot interact with the trapdoor to close it while holding shift on the ladder. Once shift is released, then I can close the trapdoor normally.
Attached is a screenshot of how my ladder is built.
Duplicate of MC-4196, please use the search function to see if your bug has already been submitted. Currently over 45% of tickets are being closed as duplicate.