Context in subflow

I created a node, that creates energy data (actual energy consumption of the day until now and actual energy data of the hour). Additionally it generates historic consumption data of hour/day/...
for calculating that, I use the context in the subflow. The big problem ist that when I change something within the subflow and submit again, my flow variable is deleted. Is there any way to mitigate this or do I have to store the date in another context (globally).

Thank you for your assistance

You may need to expand on what you mean there.

If you change ANYTHING in the subflow and DEPLOY it, ALL DATA is lost.
(As in edit any of the nodes, wires, etc)