The second action will create a new visit. Because of that, goals in that visit won't be properly attributed.
The issue is in https://github.com/piwik/piwik/blob/master/plugins/Referrers/Columns/Base.php#L369:
$visitor->getVisitorColumn('referer_name') contains the lowercased value ("campaignname"), while
$this->nameReferrerAnalyzed contains the original value ("Campaignname"). Because of this, the fix for #9299 won't be applied and
Campaign::shouldForceNewVisit will force a new visit.
In general, this logic feels quite fragile. Is it really right to consider a changed
referer_keyword value as a sign that the campaign changed, when
referer_keyword is sometimes set by internal logic instead of directly from tracking attributes? If
shouldForceNewVisit would only look at the name & type, the workaround code could be removed.
FWIW, I agree with #9944 that create_new_visit_when_campaign_changes is counter-intuitive and should be disabled by default.
Thanks for the report @laszlovl sounds definitely like there is a bug.
I suggest to discuss the default value in #9944 . Feedback is important and very appreciated on this topic.
I can't also say much about the logic being fragile and whether keyword should be considered or not. I recommend creating a new issue for this where we can focus the discussion on this.