Yes, this is a known bug which has been fixed but not released.
As a workaround, if you’re able to, you can use the distribution packages in Ubuntu 24.04, which shouldn’t have this problem: apt install python3-wxgtk4.0
Please note that if you do install the python3-wxgtk4.0 package and also need wx.html2 (for WebView) and/or wx.media (for MediaCtrl), you will also need to install the python3-wxgtk-webview4.0 and/or the python3-wxgtk-media4.0 packages.