Here in his editing for the 1837 edition, Joseph Smith changed the singular its to the plural their, to make the possessive pronoun agree with the preceding plural, all things. But the use of it to refer to all things is characteristic of the original text and will be restored in the critical text; for a list of examples, see the discussion under Alma 11:41. Also see the nearby discussion under Alma 41:4.
Summary: Restore in Alma 40:23 the singular possessive its: “all things shall be restored to its proper and perfect frame”; such mixtures in grammatical number are found elsewhere in the text.