That law applies to state employees, not elected officials. Until Desantis declares as a candidate for another office, he is not obligated to relinquish his current office under the current law. He can legally explore the possibility of a run for president but if he files paperwork to run, under the current law he must then resign his current office. So regardless of what many here are claiming, Desantis is currently not in violation of any law.
Hmmm... The Senate President of Florida disagrees with most on this thread. Why must she repeal it if he can run?
If DeSantis decides to run for president while remaining governor, it will likely require a change to Florida law. Florida currently says state officeholders must resign their positions if they run for a federal office. But Republican lawmakers, including state Senate President Kathleen Passidomo, say don’t worry about the law — the legislature will repeal it. “When you think about it,” Passidomo recently told reporters, “if an individual who ... is a Florida governor is running for president, he should be allowed to do it.”