Change this part of your code:
1if(Events.keyboard.keycode == ALLEGRO_KEY_ESCAPE) // exit on escape
3 Run = false;
1if(Events.type == ALLEGRO_EVENT_KEY_DOWN)
3 if(Events.keyboard.keycode == ALLEGRO_KEY_ESCAPE) // exit on escape
5 Run = false;
You have to check first what kind of event you have got from the queue and then process is.
At first glance it seems that when the mouse leaves window area the ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY is fired, and the values of that event match the ALLEGRO_KEY_ESCAPE condition you are checking for ( without the check for event type ).
And that makes your program exit, just like you wanted.