The effect of restrictive measures on cross‐border investment in the European Union