I joined just to reply to this post. I don't have a solution, but I had the exact same problem yesterday (1-9-25). I drove from Fort Worth to Blue Ridge and the roads were covered with snow the entire drive. My last bit of the drive was up a long rock driveway that had over 4 inches of snow. When I got to the gate to get out and unlock it, I could not get my truck out of Drive. It wouldn't shift up or down (2024 Ford F350). I took it in and out of 4 wheel drive but the shifter wouldn't budge. I couldnt even get out to open the gate because I couldn't kill the engine or get out without the truck driving forward. I called a guy that works for me that also drives a Ford F250. He said that he had that exact same problem today driving in the same kind of snow conditions. He said after a few minutes rocking the shifter back and forth it finally went into Neutral.
I did the same and I finally got it into Neutral. After getting through the gate and finally getting to the house, I got it to shift into Park.
There is something under the truck that the snow and slush interferes with to keep it from shifting. Not a solution, but its not some freak thing that happened to you.