pseudo handles are local to process as opposed to real handles which are system wide.
After some researching I learned comparing pseudo handles is not reliably possible.
A workaround that works is to wrap the handle into C++ object, implement destruction events and compare objects instead.