Seems like org.modeshape.jcr.JcrSession.getNodeByIdentifier searches by the provided identifier among cached nodes only.
Do I have to open an issue or there is a reason for that behaviour?