At commit, persistent-nontransactional instances do not change their state. Once instances have been read nontransactionally, they remain in the persistent-nontransactional state until they transition to a transactional or hollow state.
At commit, transactional instances transition to new states, based on the setting of the RetainValues flag. There is no difference between datastore and optimistic transactions in this regard.
With RetainValues set to true, persistent-clean and persistent-dirty instances transition to persistent-nontransactional and the instances retain their values as of the end of the transaction.