The GOS website has a section under Usage:
[...] Google Play apps [...] you install them within a specific user or work profile and they're only available within that profile. Only apps within the same profile can use it and they need to explicitly choose to use it.
https://grapheneos.org/usage#sandboxed-google-play
The notes app chose to use GPlay in the same profile as GPlay, and then Gplay served it ads.
Exactly like the GOS website says it would.
Try typing your notes in a separate profile that does not have GPlay & co installed on it.