Screenshot as PNG instead of JPEG?
Unfortunately I also don't know a way how to configure the format used by the system screenshot function that can be triggered via Volume-Down + Power.
However if you can trigger your screenshots via adb and the screencap command let you choose which image format is used. You can select if by the file extension:
screencap /sdcard/screenshot1.png

If you don't use a .png file extension you seem to get the raw pixel data with a small header in front containing width, height, pixel-format and the color-space (SRGB, DISPLAY_P3 or UNKNOWN).