Epic knew it, and the chose to breach the terms of service on purpose to cause this effect. Epic intentionally triggered a contract term that they knew would result in their software being removed from their customer’s devices.
They were given an opportunity by both Apple and the court to restore their software to compliance and still get to continue the lawsuit.
This is 100% Epic’s responsibility.
They could have sued Apple without deliberately breaching the contract, but they chose to make their customers into pawns in their legal strategy.