In my case the brightness gets to max value for maybe 0.1 seconds when i close the camera app, and immediately switches back to the old value.
I tried it with both, app context and %WIN. For the gallery app, both are working fine. Here are the logs.
Using %WIN:20171103 09.07.23 P Active ID4 Variable Value %WIN ~ Camera | %WIN ~ Gallery
20171103 09.07.23 E Start ID0:0.0 TaskService
20171103 09.07.23 T Running ID10 Set brightness to max
20171103 09.07.24 A OK ID10.1 Set brightness to max.Auto Brightness
20171103 09.07.24 A OK ID10.2 Set brightness to max.Display Brightness
20171103 09.07.24 T ExitOK ID10 Set brightness to max
20171103 09.07.24 E Stop ID0:0.0 TaskService
20171103 09.07.26 P Inactive ID4 Variable Value %WIN ~ Camera | %WIN ~ Gallery
20171103 09.07.26 E Start ID0:0.0 TaskService
20171103 09.07.26 T Running ID-73 System
20171103 09.07.26 A OK ID-73.1 Anon.Display Brightness
20171103 09.07.26 A OK ID-73.2 Anon.Auto Brightness
20171103 09.07.26 T ExitOK ID-73 System
20171103 09.07.26 E Stop ID0:0.0 TaskService
Using app context:20171103 09.09.53 P Active ID9 Camera or Gallery
20171103 09.09.53 E Start ID0:0.0 TaskService
20171103 09.09.53 T Running ID10 Set brightness to max
20171103 09.09.53 A OK ID10.1 Set brightness to max.Auto Brightness
20171103 09.09.53 A OK ID10.2 Set brightness to max.Display Brightness
20171103 09.09.53 T ExitOK ID10 Set brightness to max
20171103 09.09.53 E Stop ID0:0.0 TaskService
20171103 09.09.55 P Inactive ID9 Camera or Gallery
20171103 09.09.55 E Start ID0:0.0 TaskService
20171103 09.09.55 T Running ID-74 System
20171103 09.09.55 A OK ID-74.1 Anon.Display Brightness
20171103 09.09.55 A OK ID-74.2 Anon.Auto Brightness
20171103 09.09.55 T ExitOK ID-74 System
20171103 09.09.55 E Stop ID0:0.0 TaskService
Anything else I could check? My gut feel is that the updated %BRIGHT variable is not considered by Android. As soon as I do something not-camera related while the app is opened, like opening the camera menu or pulling down the Android menu, the new brightness level is activated.