Oh, I found the solution, it was because i was not passing omitBackground: true
when i screenshot the page, it makes the background transparent
await page.screenshot({path: 'example.png', omitBackground: true});
does this
await page.screenshot({path: 'example.png'});
does this