thanks
// constrain drawing tool to rect - "canvas"
float mx = constrain(mouseX, 100, 440);
// and later do
ellipse(mouseX, mouseY, x1, diameter);
so you use constrain but not use the result,
instead mx you use again mouseX,
so it is actually NOT USED!
but more, as you have
ellipseMode(CENTER)
your drawing will still be over the button area
and as you not check if you are over button area or over drawing area
you would still draw something at the moment when you press the button.
that is why we try long time to show you better ways.