I'm not an expert on the legal points surrounding what you could actually do to help prevent foreign actors from making contributions to third parties or whatnot. What I do know and what I have seen in a lot of the research we've done tracking foreign influence in other countries is that they tend to work alongside a lot of the nationalist movements that are already in place.
Looking at the U.S., for example, it was always hard to differentiate the language of a Russian influencer from that used by members of alt-right organizations. A lot of that goes hand in hand and they work together to create somewhat of a shared narrative. I do think, however, that there are things we could do to regulate this problem. I think Professor Pal has made some good points. I don't think it's ever going to completely go away, but it's about raising the cost for these foreign and other bad actors. Raising the costs makes it just a little bit harder for them to start influencing voters.
I think transparency around where the funding is coming from, how much of it is spent, and what it's spent on would help create a little bit more accountability in the political system.