Well, why you think that engine dont compare new value with current one internally? About "better approach" - GC allocation on each getter call, better to return cached mSortingLayerName and fill it at OnEnable or something like this.
Ah, understood about "mark the scene as edited continuously." - this can be fixed with "#if UNITY_EDITOR" wrapping.