Not sure if this is a bug, we need to investigate.
Switching to dark mode in PF was made on https://github.com/3scale/porta/pull/1525, since then when collapsing an expandable menu a "jump" is visible, text goes down for an instant and then menu collapses.
This is PF/React code, maybe is a bug, we are asking PF team.