fix #30681

In principle, Text class is not directly used for text annotations. This PR substitutes the use of "Text" with "StaffText" for annotations within a measure. Measure numbers ("Text" objects) were already being discarded.