However context-switching is sometimes inevitable, even though the cost associated with it is heavy.
There is sometimes some "important and urgent things" that you have to deal with while stopping what you were dealing before.
Keep it simple
You forget. You have to start again. Or you have to load the register memory in your brain by non-systematic way unlike computer. For computers it have a systematic way of backup and loading the register memory to the memory.
Then how should I deal with it?
Memo is a good tool.
Journaling is also a good tool.