Changing opacity of inactive windows in KDE

You can do this via a generic Window Rule that covers all windows.

System Settings > Workspace Appearance and Behaviour > Window Behaviour > Window Rules > New…

You probably want to limit Window matching rules, so that (e.g.) the panel will not have its opacity changed. I'm not really sure which you want. Perhaps chose "Normal Window" to start with, and possibly "Dialogue Window" if you like.

Change tabs to "Appearance & Fixes", then check Active opacity > Force; 100%. Also check Inactive opacity > Force; 30%. Click OK then Apply.

enter image description here