Gutenberg sidebar example does not update meta field in the database

Registration of meta field must happen outside of admin area check. I had it enclosed in if (is_admin) check, so it was only happening when it passed this test. This was incorrect.

The question is duplicate and original question and answer are here:
Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”