That's not how copyright infringement works. Great, you've stopped committing new infringements, but there's still a legal case over the previous infringements, for which you still need to provide appropriate remedy.
If the remedy for copyright infringement were just "oh, we got caught, guess we'll stop now", that would provide substantial incentive for people to violate licenses as long as they hoped they wouldn't get caught. The remedy for such violations needs to be substantial enough that it's not profitable to temporarily get away with.
The company would have to pay a fee to the copyright owner plus some extra.
I am jaded from practice around GDPR where the thinking of companies goes along the line: if we are caught, we will pay extra, but now we make big cash. And who knows, maybe we won't get caught.
If you use AGPLv3-licensed code in your codebase, you are agreeing to the terms of the license.
Practically all corporate legal teams for companies that creates software will strictly prohibit the use of AGPLv3-licensed software, if not all GPL-based licenses.
Using AGPL code doesn't mean you agree to the terms. It means if you don't agree to and obey the terms, you don't have a license, which is copyright infringement.
Being taken to court for infringement of free software's copyright is rare. On top of that the copied code only being a snippet from copilot makes it even less likely to happen. The snippet alone may not be considered copyrightable.
If the remedy for copyright infringement were just "oh, we got caught, guess we'll stop now", that would provide substantial incentive for people to violate licenses as long as they hoped they wouldn't get caught. The remedy for such violations needs to be substantial enough that it's not profitable to temporarily get away with.