<< I’ve heard that when gaming, it’s actually better not to run the laptop on battery power. >.
nonsense.
That computer is a battery-CAPABLE device, It is not optimized as a battery-operated device (it is not an iPhone.)
Your computer performs best when connected to AC power, such as the power adapter. It can use the full output of the Power Adapter AND when doing especially challenging work could also freely "borrow" power from the battery. In some cases, even with the power adapter connected, the charged state may decline during very stressful work.
When used only on battery, your computer has no extra cushion of power, and may perform more slowly. However, for ordinary non-stressful tasks this may not be objectionable (possibly not even noticeable.)
In general, you should ALWAYS connect a power source when it is possible to do so, and only run on batteries (which could be somewhat slower) when no power sources are at hand. Modern Macs maintain optimum battery charge levels under program control, and will NEVER over-charge. Connected to Power is NOT necessarily charging.
The CHARGER is inside the MacBook Pro, and is completely under program control. Your Mac accepts some power when needs to run, and accepts more power when it intends to charge its internal battery. A power source like the Power Adapter or certain Displays can not 'force itself' on your MacBook Pro. Only the algorithms inside your Mac can decide when is a good time to charge the battery. Your Mac can NEVER be over-charged.