Flow variables in subflows

Hello everybody,
I would like to create a subflows that use their own internal variables in multiple subflow nodes

These are the characteristics:
the variables must be read and written in more nodes of the subflow.
if two subflows are positioned within the same flow, they must not read the variables of the other subflows.

I tried using the flow variables with the flow.set and flow.get functions but by placing two subflows in the same flow they access the same variables.
I also use env.set and env.get functions (I'm not sure these features exist)
I'm sure I'm missing something, but I can't figure out what.

Thanks in advance

I've accomplished similar by adding the variable to the msg object as a separate msg.part and then extract it inside the subflow. That said I'm trying to figure out a similar use case to yours on a different flow where the msg object is getting reset prior to the injection into the subflow (I've used a join workaround to reattach my variable msg.part right before the subflow but would like a simpler solution if you figure one out)