Scientists studied the phenomenon of flow in jazz pianists, using neuroimaging. They found a lot, including this:

The flow state in jazz is not available to beginners. A pianist who has been playing for six months and who stops monitoring their left hand does not enter a creative state; they hit wrong notes. The release of monitoring that produces creative flow is available only to musicians who have practised long enough that the monitoring can be safely suspended because what it was monitoring has become automatic. The freedom comes after the constraint, not instead of it.