Why does serial.read stop working?

You can use the concept of a State machine without using the Statemachine library. Not using the library might give you more control or make the project easier to follow.

I wrote a demo program in this Thread that illustrates how different events can be managed using millis() and variables to keep track of the states of the system.

...R