I2C slave protocol

the Master may (must) turn itself into a Slave and jump into the Wire.onReceive() routine to grasp the data.

No that is not how it works. A slave can send data but it can not initiate a data transfer. So a slave does not turn into a master to respond to a request for data.

One idea: are you using volatile variables for the flag and position and having critical section in the loop when you reset the flag

Not so sure about this but I will give it a try thanks.