There is a very limited number of border crossings between Tibet and Nepal where foreigners are allowed to cross. In fact I think that there are at the moment only two: Hilsa and Kyirong. For Chinese or Nepali there are a few more, but the summit of Mount Everest is not one of them.
If you cross the border at Mount Everest, or any other illegal spot, you can face heavy fines, bans from the country or even prison time. It might also have repercussion on other climbers or trekkers.
It has been done before. In 2017 the Polish climber Janusz Adam Adamski crossed from China into Nepal. From the Nepali, he was hit with a fine of 22000USD and a 10-year ban to climbing in Nepal. The Chinese didn't immediately punish him personally (probably because they couldn't do much as he was in Nepal), but basically closed all of Tibet for all foreign climbers. It is clear that this is one of the most efficient ways of making yourself an absolute pariah in the climbing community.
Tl;dr: don't even think about doing it
In the past: It used to be possible to obtain permits to make the crossing. 34 of such crossings by 32 climbers had taken place. However, in 2010 China started to refuse all permits for a crossing. If in the future the Chinese decide to issue permits for crossings, it would be possible again.