I think Foles has a clause in his contract where if the Eagles franchise him he can pay them $2mm to void it. Not sure if it applies to the team that trades for him but maybe they franchise him to keep his rights, trade him, Foles exercises the option to void the tag, and negotiates a long-term deal with whoever traded for him.
Looks like the Eagles just really don't want to lose his rights. They're leaking that they want a 3rd round pick for him but I suspect that's done to drive the price up. Still, it seems like a big gamble. If no one hits their asking price and he's stuck on the roster after receiving the tag that's going to hurt. I guess they're very confident he'll be traded even if he is tagged?