Please have a look at the attached image to understand the problem. In the image you can see, how can I remove the border lines or set their color to the QDialog color. Thanks.
Try setting the QTabWidget Stylesheet to have 0 border.
So for instance:
tabwidget.setStyleSheet("QTabWidget::pane { border: 0; }");