The Mizrachi (8:22) says that the sun and moon still orbited, and when Rashi says "Lo Shimshu" it means the sun and moon did not give off light, but they still continued moving. (He is later left trying to understand how Noach knew what day it was, how the Dove was expected to find a place to rest, and why Noach built a window in the Ark, according to the opinion that it was a window).
The Maskil LeDavid explains exactly the opposite. He says that "Lo Shimshu" means they didn't move, but they still gave light. Since the Flood started in the morning, both the sun and moon were visible in the sky, and they stayed that way for the duration of the flood. Noach used the window to see what was going on in the Ark.
According to the Mizrachi we can understand how the flood ended on the 27th, but we're left with several unanswered question. According to the Maskil LeDavid we can answer the Mizrachi's questions, but we're left trying to understand why the Flood didn't end on the 18th.
Perhaps we can answer this by combining the two opinions. When the flood started the sun stood still, but still functioned, and there remained light for the duration of the flood. Because the sun was shining, the moon was not visible at all and during the whole year the moon kept its orbit. However, since the moon was not visible during the whole year, it was as if it wasn't functioning, "Lo Shimshu". There was no visible passage of dates, but Noach had signs to determine night and day (as the Maskil LeDavid says, see here). Thus, when the flood ended and the sun set, that night the moon was in the position of the 27th of Cheshvan, since it had kept moving the whole time.
"Lo Shimshu" means different things for the sun and moon, the sun stopped moving and as a result, the moon stopped shining.
There are a couple problems with this answer:
This answer is like none of the opinions I've seen.
It would mean that all the heavenly bodies stopped, with the moon being the only exception. Why should the moon act differently than the other heavenly bodies?