Spanish is the fourth most used language in the world with over 500 million speakers across multiple countries so I’m surprised that Apple has not fixed this problem yet. To me, it seems disrespectful.
I have found this work around for my Spanish studies and for sending messages to Spanish speakers:
Select the Spanish keyboard
Turn on the correction prompt.
Then when a word that should have a tilda is typed in, the word will be highlighted as incorrect and an option will appear to select the same word but with tilda.
It’s fiddly and not ideal for language learning but it is better than not having the tilda, especially for tests and for polite communication.