That is what they argue now, they argue their margin in EU is almost zero. But because they transfer costs internally in any way they like (abusing the IP laws that they need to do business in the first place), they can make the profit appear in any country they want.
If countries want to stop missing out on these taxes, I think they should just stop accepting the whole argument. If companies really accept lower margins in some country, they can also afford to pay a bit more taxes.
Does this work for non-tech companies or other companies who really do have different margins in different countries? How do you decide who to enforce it for?