The behavior you indicate is predictable, you must first know that if a widget becomes visible your children will also be visible.
Let's analyze the case of QTabWidget, this widget is essentially a QTabBar + QStackedWidget, the QStackedWidget manages the visibility of the widgets, and the latter internally has a QStackedLayout that when it establishes that a certain widget is wanted to show then it hides the current widget and shows the new one current widget. So every time you select tabbar the widget that is displayed will call the show method of that widget (in your case QTableWidget), and it will make your children visible even if they are hidden.
So if you want that if you have the need that works as you suppose a workaround should happen it is to save the status of the visibility in a property and in the showEvent method to apply the change if necessary.