Every time I try to charge the Pixel 7 it keeps getting stuck in a loop of charging / not charging. It switches every second just like there was a faulty connector. But the thing is, it works just fine when the OS is not booted and worked fine before flashing the OS as well.

ChicoCa You might try "Bug report" in Developer Options. Maybe the system log will show something interesting when you plug/unplug?

    a month later

    Hi, did you find a solution ? I have the exact same problem, pixel 7 pro, it does a loop charging / not charging. Brand new cable, tried to change it same problem, Official google charger as well. The behaviour really makes it look like a software thing. It looks like it's going from fast charging - normal charging - no charging, ...