I believe he did:
From 2021: Gov. Ron DeSantis says he won’t run for president because he’s busy ‘trying to make sure people are not supporting critical race theory’
https://news.yahoo.com/florida-gov-ron-desantis-says-031935029.html
Nowhere in this statement, made over a year before his landslide re-election, does DeSantis state that he will not run if Trump runs.