Hi @Zishaan,
It looks like setting the variable through a task listener (tested on assignment event) doesn’t trigger the attached conditional event for some reason.
I did a small test setting the variable using an execution listener (tested on start event) and the attached conditional event has been triggered as expected.