Only charging when fully shut down

Hello I have a HP Gaming Pavilion - 15-dk0056nr
Everything works on it just fine, except for the fact it will not charge when powered on.
It will charge perfectly fine to full when shut down.
I’ve tried replacing the battery.
The AC adapter works on the note of it charging it to full when shut down.
The port seems fine as well, but could be the problem.
I’ve fully updated everything that could be updated.
Bios included.
I’ve tried messing with the settings and i’ve tried messing with the battery drivers.
I don’t want to have to replace the motherboard, if that’s even the problem. IDK.
Help please.