The parts of Donbas that didn't (successfully) separate from Ukraine could vote, the parts that did successfully separate and become the Donbas republics could not vote for Zelensky. I may have misunderstood you as there are a lot of ways to draw a political map of Ukraine. We have the actual separatist regions that turned into the Donbas republics, the regions where there was a separatist uprising that was crushed (Mariupol and Lysychansk most famously), regions with significant separatist sentiment but without large uprisings, separatist and Russia sympathetic regions , Russian speaking regions , and finally Crimea.
The parts of Donbas that didn't (successfully) separate from Ukraine could vote, the parts that did successfully separate and become the Donbas republics could not vote for Zelensky. I may have misunderstood you as there are a lot of ways to draw a political map of Ukraine. We have the actual separatist regions that turned into the Donbas republics, the regions where there was a separatist uprising that was crushed (Mariupol and Lysychansk most famously), regions with significant separatist sentiment but without large uprisings, separatist and Russia sympathetic regions , Russian speaking regions , and finally Crimea.