Remove `.modal-open` class after backdrop is hidden

Fixes #14274 and #14632.