Fail to resize when expanding or collapsing elements, wxPython 4.2.0

Fedora Desktop 36, Python 3.10 and wxPython 4.2.0
The problem is when I expand the group of elements, the container does not resize to show them. and when I collapse (I have to switch to other notebook page, to force the resize), the container does not shrink.

With wxPython 4.0.7 all works as expected.

I only see this failure in Linux, not in Windows.

I recorded the working as expected in wxPython 4.0.7 and the broken example in wxPython 4.2.0.

wxPython 4.0.7: https://youtu.be/W0L236kMTto

wxPython 4.2.0: https://youtu.be/NtNZ3YGdhFM

(this is a minor problem, because few users are affected, I think :wink: )