Show dimensions only in layout view

Is there any way to hide the dimensions in regular viewport but show in layout view by either layers or any other way.

I tried using dimension command outside layout view but that gives me this result which is not accurate and not aligned to plane

I found a workaround: by creating seperate display modes (Uncheck annotation)
but this maybe useful for someone else so i am not deleting the post.