This question was prompted by two phenomena I've encountered as a 24yo self-taught jazz musician of 2 years who is committed to playing entirely by ear.
A large fraction of people, myself included, when recalling songs do so within 1-2 semitones of the original key. This shows that when internalizing music, the brain does so with some link to the actual key, despite not being able to identify the actual key or note when unfamiliar music is played (ie perfect/absolute pitch).
When learning complex melodies or chord progressions, I can play the first note or chord, and audiate the rest. However, when transposing the concept (starting at a different note) I struggle to hear the rest in my head. I don't have absolute pitch, so shouldn't my brain be totally agnostic to the specific key I play the concept in and thus able to hear it correctly no matter at which note/chord it started?
These patterns seem to imply that though I do not have perfect pitch, the licks and changes I learn are ultimately internalized with respect to the actual key I learned them in. I hate this idea. I want to fully digest all the licks and changes I learn by ear. I want them to be deeply ingrained into my musical cognition and aurally summonable in any key when improvising.
This has implications for how I practice: should I make it a point to play and sing my favorite songs and progressions in every key? Are they not fully digested/internalized if I don't?
NOTE: With respect to reproducing/playing music back in different keys, I mean mainly in terms of singing/whistling/humming/hearing in your head. The question presumes a skill level such that playing the concept on an instrument in different keys is a trivial task. I am a guitar player, so almost often this is the case for me. The question stresses the mental aspect of improvisation, as ideally I'd like to play whats heard in my head, not what the instrument suggests to the muscle memory in my fingers.