Hello and welcome to TSG!!
One thing I thought of in this context is that usually the power settings differ between running on battery or plugged in. Perhaps the CPU speed is reduced when running on battery power. Look in the settings. As a test, try setting the "plugged in" settings to match the "on battery" settings. Just a guess ...