I got to learn how knotty python screen capture can be. In some cases, using Selenium headlessly would give me better screenshots. A couple of other options you can test out are explained
here in detail. Depends on a couple of factors if they will work in some specific cases, as always. It is still possible that you'll be struggling with pop-ups and cookie banners, plus all kinds of lurking issues if you need full-page screenshots.