Hi Divyanshu,
Windows does not have a function to dim inactive apps, that is always caused by a process installed by the PC manufacturer, on a Lenovo device, it is usually the 'Intelligent Sensing Service' that causes this.
Click your Start Button, then just type services and press Enter.
Scroll down the resulting list of services to find 'Intelligent Sensing Service'.
Double click that service to open it.
Stop that service, and set its startup type to disabled and apply those settings.
Restart your laptop to apply the change and check if that resolves the problem.