You first have to kill the Dynamic Shared Object inside the stanmodel slot of a stanfit object. Like
fit@stanmodel@dso <- new("cxxdso")
saveRDS(fit, file = "fit.rds")
Of course, only do that when you are done with it because you would have to recompile to estimate with it further.