Values in Editor are reset When Platform Switching

I have next code on Prefab with declaring variables relevant only in Editor but these variables are different for iOS & Android. So variables are assigned in Editor.

When Switching between Platforms in Editor then values which set in Editor before are reset.
Is it normal behavior or Bug?

If it’s normal, why it happens and how I can achieve my goal when values are not reset when Switching.

I use Unity 2019.3.5f1

I submitted Bug Report, Please Vote, Guys:

#if UNITY_EDITOR

#if UNITY_ANDROID

    [SerializeField]
    private Mesh mesh;

    [SerializeField]
    private Vector3 pos;

#elif UNITY_IOS

    [SerializeField]
    private float number;

    [SerializeField]
    private int index;

#endif

#endif

When you switch platforms the code is recompiled, so it is expected behavior. Not sure if there is a clean way to do it

any dirty life hack?

Use ScriptableObjects and have a reference for each individual pack.

I submitted Bug Report, Please Vote, Guys: