This is expected behaviour. From the manual entry for 'InitializeOnLoadAttribute' :
"Asset operations such as asset loading should be avoided in InitializeOnLoad methods. InitializeOnLoad methods are called before asset importing is completed and therefore the asset loading can fail resulting in a null object. To do initialization after a domain reload which requires asset operations use the AssetPostprocessor.OnPostProcessAllAssets callback. This callback supports all asset operations and has a parameter signaling if there was a domain reload."
https://docs.unity3d.com/ScriptReference/InitializeOnLoadAttribute.html