deltatime glitches

The game scene starts with timescale = 0; after that Time.deltatim works properly. Then timescale becomes 1 - everything is fine. Then one more timescale = 0. And here comes the problem. deltatime becomes equal 0. What is the matter?

That is intentional, as Time.deltaTime in Update() reflects the time since the last frame, but scaled by Time.timescale. See here for a more detailed review of the situation: Time.timeScale seems doesn't work with Update - Unity Answers

Actually, the fact that Time.deltaTime is not 0 if you already start with Time.timescale==0 is the bug.