I also found it very weird on the input-call behaviors, in which the inputevent for Area2D is always called after unhandledinput. After I google around, I did not found a proper solution.
Fortunately, after some trick applied, I got a very simple workaround. NOTE, for anyone who does NOT use Area2D input for mouse above, this trick may be not workable.
- setup input for Area2D to capture mouse click (not _inputevent);
- setup other Node for unhandledinput capture;
- do the trick;
3.1 add an ismouseover flag for the Area2D;
3.2 link mouseentered message to set ismouseover true;
3.3 link mouseexited message to set ismouseover false;
3.4 under Area2D input, only handle the event(run your own code) and gettree().setinputashandled() when ismouse_over is true, or you don't even handle the event under Area2D;
The idea behind it. input is always fired before _unhandledinput in real code, so instead of using inputevent, for Area2D I use _input to get the event msg in advance; and only handle the event while the mouse is over this Area2D.
pros & cons. I think all input will be going through this Area2D first, so if you instance this node a lot, maybe will get a performance issue, which I did not test. the nice thing is, at least it works.