Applescript activate not making the application fully active
The alternative is to activate your app through Dock:

tell application "System Events" to click UI element "MyAPP" of list 1 of application process "Dock"


The way I got here is to use Automator's record feature and copy the 
steps" and paste them in Script Editor. It translates them to AppleScript.