The problem with Global` variables is that they are global... :) That is, if you open draw[]
twice, it will share state and interfere with each copy.
Even if your GUI will not support multiple instances / prevent its existance, it is good to wrap definitions with private context by using standard BeginPackage + Begin["`Private`"]
to not run out of symbols for multiple projects / other people projects.
At the end you could use $CellContext [1] but it is not convenient, out of the box, requires deeper understanding and slightly adapted setup to work so untill you know what is the end shape of your gui, it is not worth for beginners.
- https://mathematica.stackexchange.com/a/102391/5478