I saw that my laptop always changes the brightness and gets darker when I pull out the charging cable, is there a solution?
Yes.
With the unknown laptop, the brightness can probably be set separately for battery and mains operation.
You have to define in the energy options in the settings what should happen if e.g. The power cord is removed. The default is a throttling of the output, e.g. A decrease in screen brightness.
In the energy options you can adjust the setting to 100% brightness or less if the power cord is removed.
Is probably in the energy saving optima. Just have a look
Thank you first looked in the normal settings but that didn't help me so I looked at the Intel settings