I'm just catching up and saw the solution to T88473. I don't think it should be done this way and seems like a hacky way to fix the problem.
This is not good - an id really should be meaningful and should be consistent for different users/different sessions or it shouldn't be used at all.
Please revisit this restoring collapsible-block-1 etc.. and instead prefix these e.g. toc-collapsible-block-1, page-collapsible-block-1
On a side note, this has already created issues with the browser tests.