This can be reproduced easily with XCode's generated AUv3-Extension Projects.
For MIDI Processor type AUv3-Extensions, the contextName property is only set once during initializing when added as a MIDI FX within Logic Pro, but not after changing the track's name manually.
For Music Effect type AUv3-Extensions, contextName is set initially when added as an Audio FX within Logic Pro as well as updated as expected after changing the tracks's name manually.
Am I missing something or is this a Logic Pro bug?
Thanks,
Tobias