The darkness bug is caused by losing Ultravision while you are under the effect of Darkness. As I understand the last fix was done by making darkness TEMPORARY instead of the default, which is permanent. This just means the bug has a maximum time limit.
For some reason, the effect of Darkness is not fully applied due to you having had Ultravision and this causes darkness to be in a state of half working when you left it.
(https://i.imgur.com/pF22G8F.gif)
Adding the effect of Ultravision for a split second on leaving will correct this issue. See the below examples, where I use an item that gives Ultravision for a second. Then when you leave, it applies it for 0.01s
(https://i.imgur.com/XnWP5yQ.gif)
Should fix the existing issues for now, though it's not perfect. The alternative is to apply the darkness effect to the existing creature again before it's removed.