Fix collapsed files not fully fully expanding Closes #53866 See merge request gitlab-org/gitlab-ce!23019