Non-persistent entities won't be saved in the database, therefore they cannot be retrieved via a database or xpath (which also retrieves from the database) retrieve in a microflow. Non-persistent entities are saved in cache
https://docs.mendix.com/refguide5/transient-objects-garbage-collecting
You can find some more background info on non-persistent objects here
Desiree's answer is correct, see for more documentation: https://docs.mendix.com/refguide/persistability