I finally managed to modify the code, to make it work for my game.
In my case, I want normal key pickups that trigger the screen / unlock doors: which is the normal (current) behavior.
And I want some collectible pickups that don’t trigger the screen nor unlock doors, I want that pickups that just increase some variable (score, or money, or rubies, or ammo, ...)

What I do, is using "health" property of pickup objects, to do the difference.
If the pickup object has no health set, I consider it's a normal key lock pickup. And if there is health set (more than 0), I consider it's a collectible.

otherIsNotAMonsterTypeCollision:
LDA ObjectFlags,y
AND #%00100000 ;; is it a 'collectable'?
BEQ otherIsNotAcollectable
;;;; IS A pickup / power up
DeactivateCurrentObject ;; makes the other object go away
;; since other object is loaded in X
;;=========== WHAT DO YOU WANT TO HAVE HAPPEN WHEN YOU COLLECT THIS ITEM?
;;;;;;;ADD TO SCORE:
AddValue #$05, GLOBAL_Player1_Score, #$01
LDA DrawHudBytes
ORA HUD_updateScore
STA DrawHudBytes
;;;;;;;;;;;;;;;;;;;;;
;; JSR HandlePlayerPowerUp
JSR countAllTargets

Unfortunately, yes for the key pickups objects, that trigger the screen (unlock the doors), still make monster SubPal#1 goes wrong.I could reproduce that in the pi version too (not only the empty one).

Dale I tried your code and now everything is working for me. I have my regular pick ups and key pick ups. Collecting the regular pick ups are no longer changing monster palette upon collection and are acting as my score pickups as intended, and key pick ups are triggering corresponding locks on intended screens.

It was for the beta version. Now in the new version of NESMaker (the official version), it's quite different. But easier !
Just use Game Objects : key pickup, health pickup, coin pickup...
And you can assign script to each of them, in the Project Details ("Power Up 00" to 03).
These pickups don't trigger the screen!