Based on the information you provided and the screenshots you shared, it appears that your laptop is experiencing a power-related issue while gaming and charging at the same time. When your laptop is running on battery power, the CPU clock speed is able to maintain a higher level, but when it's charging, the CPU clock speed drops significantly.
This behavior suggests that there may be a power management setting that is causing the CPU clock speed to throttle while the laptop is charging. This is likely a safety measure to prevent the laptop from overheating or drawing too much power from the charging source.
Here are some steps you can try to resolve the issue:
Check the power management settings: Go to the Control Panel and navigate to Power Options. Check the advanced settings for your power plan and look for any settings related to CPU power management. Try adjusting these settings to see if it resolves the issue.
Update the BIOS and drivers: Check for any available updates for your laptop's BIOS and drivers. These updates may include fixes for power-related issues.
Use a different charging source: If you are using a power adapter, try using a different one to see if the issue persists. Make sure that the new adapter is rated for the same voltage and amperage as the original one.
Check for overheating: Overheating can also cause CPU throttling. Make sure that your laptop's cooling system is functioning properly and that the vents are not blocked by dust or other debris.
If none of these steps resolve the issue, it may be worth contacting HP support for further assistance.