[matter] fix post_build execution wrt collected statistics