First of all, App Lab isn’t a full JavaScript environment, and some things that work in browser JavaScript may not necessarily work in App Lab, such as event.stopPropagation().
To solve your problem, you could use a variable in the code to check if the screen element clicked was the button, or the screen itself, along with a setTimeout function to reset the variable.
var wasLoginClicked = false;
onEvent("btnSigIn", "click", function() {
setScreen("Register");
wasLoginClicked = true;
setTimeout(function() {
wasLoginClicked = false;
}, 0);
});
onEvent("Login", "click", function() {
if (wasLoginClicked) return;
console.log("Only run this function if the click happened outside the button");
});
Also, please post your code as text and not images, it helps speed up the debugging process rather than manually typing in all of the code.