As answered here, use:
self.app = QApplication(sys.argv + ['--no-sandbox'])
Also unless there is a specifc reason that you are using PyQt6 for this, this website shows multiple far simpler ways to screenshot a website using Python.
PyQt6