on 17 june 2018, de tomás signed a new contract with real madrid until 2023. two months later, he was loaned to rayo vallecano for another campaign. he scored his first goal in the spanish top tier on 22 september, but in a 1–5 home defeat against deportivo alavés. the following 11 january, also at the "campo de fútbol de vallecas", his hat-trick helped the hosts down rc celta de vigo 4–2.