It's getting it via auval in a separate process. It does it once and then caches the result. If you write a log file from your plugins constructor, you'll see it's being called when you delete /Users/[user]/Library/Caches/AudioUnitCache then launch Logic. Or you can select the plugin in Logic's Plug-In Manager and hit "Reset and Rescan Selection"
As far as the cause of the issue, it sounds like it may be due to a threading related race conditon. Hence why auval is ok and and Logic not. You can usually catch these using the Diagnostics > Thread Sanitizer in "Edit Scheme" in XCode, using a light weight host like the one in JUCE or AudioKit.