I agree with Pallas and Keystring that looking at your phone is a break away from the piano. However, when it comes to your brain - it is not a break for your brain. You go from one activity to the other.
Molly said in our chat that she spaces out when she takes a micro-break.
There is a phenomenon called "memory consolidation interference". It is a disruption or impairment of the process by which short-term memories are stabilized and transformed into long-term memories. Consolidation typically occurs after the initial learning phase and can be disrupted by various factors, such as new learning. Acquiring new information shortly after initial learning can interfere with the consolidation of the earlier memory.
You may have heard that people who have just gone through a trauma are encouraged to play Tetris to stop disturbing memories from forming. Playing Tetris keeps the brain busy with visual and spatial tasks, which can help prevent the upsetting images from being stored as long-term memories.
So what you do during your breaks can have an impact on your memory!