fplot() operates in two phases. There is some kind of internal preparation first, after which control returns to the program. The fplot continues working in the background. If I recall correctly, the axes is created in the first phase but the lines are drawn in the second phase.
The second phase can take considerable time. Several hours even. It is performing some kind of analysis to try to find accurate representation of rapidly changing lines, and find poles and discontinuities.
If you clear all while fplot is in the second phase, you destroy the data it is relying on but not the fact that it is executing.
You should expect similar difficulties if you have device callbacks going, or timers, or the new background threads.