How to update the initial condition in DifferentialEquations?

Just for completeness, an identical question from a previous discussion: https://discourse.julialang.org/t/efficient-way-to-handle-operator-splitting-periodically-updating-solution-mid-solve-in-juliadiffeq/30757/1