This doesn't just happen, it is a situation that develops. That developing situation will be watched closely by ATC, who will communicate with the approaching aircraft.
"Its speed was mini"
Note how the approaching aircraft can hear ATC trying to talk the A318 off the runway. Also notice how they call "go-around" (abort) immediately after "Minimums" is called out. Minimums is the normal decision point where you abort the landing if the aircraft isn't positioned, configured and stabilized, the runway isn't seen, runway isn't clear etc.
Double trouble: Route interference
There's actually a worse situation than what you propose. You have the aircraft NOT taking off, and we've shown that's straightforward. What if it does successfully take off?
Now we have a route conflict and a collision risk, not just on the ground, but in the air. Watch this.
Green (Ukraine) was lined up for takeoff, but wasn't fast enough to get out of purple's way. *At this point, it is a foregone conclusion that purple (KLM) MUST go around.
But there's a problem. On a standard go-around, you fly runway heading - climbing over the runway and continuing that "line". That means for Purple to go around, Green must not be in that air! That's why Green was ordered to stop and hold on the ground even though he'd already started his takeoff roll.
Unfortunately Green had some "radio trouble", and continued the takeoff anyway. He would be in exactly the on-runway-heading space that Purple needed to "go around" in.
So ATC made an urgent radio call to Purple telling him to immediately turn to another heading. "Go around, immediate right turn heading 010". If that radio contact had failed, Green and Purple would be flying in the same airspace, and relying on visual observation to miss each other.
It was presumed that Green was unreachable because of his "radio trouble". Just as likely, Green realized that if he aborted takeoff here, he'd have to pull off to a ramp, work a hot-brakes procedure, and then get back in the queue to takeoff at this busy airport, with an hour or even more delay, maybe with disruption to the schedule for the rest of the day. So he decided to have "radio trouble" and let ATC clean up the mess. That's no way to make friends in the tower!