As a test, and for those that have MS Word on iOS/iPadOS too, try copy/pasting from Word directly into a GMail Compose window and assess the result. Word places 25 distinct data types on the clipboard representing the content that was copied. The ability of GMail to reproduce what was pasted depends directly on how Google designed GMail to accept the right clipboard datatype.
I have Word v16.78 on macOS Sonoma 14.1 and when I copy a paragraph containing some red text and a yellow highlighted word to the clipboard, and then paste directly into a web-based GMail compose window, the text appears exactly as it does in MS Word. This may be Firefox 119.0 or GMail, but that is impossible to determine.
If i take the same exact text marked up identical to what I copied from MS Word, but opened in Pages v13.2, it pastes into GMail compose window as simple plain text. Pages places 18 data types on the clipboard, most for use by Pages, so little wonder that a direct copy/paste from Pages into GMail arrives as plain text.
Google assumes that the majority of users are using MS Word, Word clones, or Google Docs — not Pages, and makes no accommodation for Pages content on the clipboard other than as plain text.