I have the same issue with version 3.0.1. There is a comment in the stackoverflow link that gives a possible explanation for the issue:
"The problem is in the DefaultStateMachineService class, during acquiring SM the service creates a new SM and the JpaPersistingStateMachineInterceptor persists the new SM with an initial state, then the DefaultStateMachineService reads state from DB (the state is already overridden) and calls restoreStateMachine method with the overridden state."
See: https://stackoverflow.com/questions/64048641/hierarchical-states-are-not-being-persisted-in-the-database
I have the same issue with version 3.0.1. There is a comment in the stackoverflow link that gives a possible explanation for the issue:
"The problem is in the DefaultStateMachineService class, during acquiring SM the service creates a new SM and the JpaPersistingStateMachineInterceptor persists the new SM with an initial state, then the DefaultStateMachineService reads state from DB (the state is already overridden) and calls restoreStateMachine method with the overridden state."