Instead of setting rules with names, set them with classes.
Open an st window. In that, run `xprop`, and the cursor should change to a cross. Now, click anywhere inside the window, and `xprop` will return a somewhat substantial output. From the bottom, look for an attribute `WM_CLASS(STRING)` (or something like that). It will have two values, which will most likely differ only by case. The second one mostly works.
Then in the `compton.conf`, set rule as `opacity-rule = ["85:class_g = '$window_class'"]`, and replace `$window_class` by the class `xprop` returned.
Restart `compton` by `killall compton; compton &` and report!!