i don't know which Lenovo laptop u have but mine (the version with the rtx2060) does the same.
My thought on this is that it is just because of power limitation. The Lipo in the laptop is just not powerful enough to handle the components on battery use only.
I mean a pre-build pc with a rtx2060 would have about a 500 to 600 watt power supply.
That's something the battery can't do on its own, which is why u need to have it on charge while gaming.