Only as much as during the Second World War.
Okay, first of all? The Second World War? This is not an honest example given the OP's statement. Given that neither of the Axis with a significant Navy had a chance of reaching CONUS, Civilians were truly not at risk of being killed. At all. (Until the I-400s started a forest fire, but not relevant). Regardless, this is a silly argument. As
@Valmond has stated, there were strategic goals in WWII beyond "LMAO CONQUEST". Additionally, all those people immediately saying nukes will fly? Why? For what reason? The US doesn't pull out the nukes
by doctrine until everything has gone to hell and worse. Given that the OP has stated he wanted Army Scale clashes between Fantasy and Modern Tech, I will sigh heavily and point to Final Fantasy XIV's interpretation of what would happen (Because something similar actually happens in those games, albeit at a smaller scale) if you really want an example.
However, if you want to force me to actually think, here are my thoughts:
Given A: Mages being common/magic being common, and B: The Modern Tech Users cannot into magic in a reasonable time, basically, this will happen. The US will deploy troops due to the nebulous reason these two polities are at war (Given I wasn't given a good reason, I'll write it off as VS Debate shennagins). 1st point of contention with glorious army clash: We haven't done that shit in a real way since the Civil War IIRC. It just doesn't make any sense with modern technology and doctrine. So, you have the fantasy guys lining up to defend their portal, for example. Well, you know what the US will say to that? "Artillery? See those fantasy rejects?" "Yes Sir." "I don't want to." At which point, the Army's artillery will rain hell down upon the fantasy army. Of course, due to magic, it won't be a total slaughter, but the fantasy armies will quickly learn that engaging on the open field of battle is a Bad Idea.
Having established that "GLORIOUS ARMY CLASH" won't realistically happen, we move on to the logical conclusion of this. The US secures the portal with minor casualties. Someone says to invade the portal. The military, of course, being intelligent people, will send scouts through first, likely a UAV or some unmanned vehicle. If that doesn't work, I'd imagine they'd deploy either dedicated recon units or Spec Ops to scout, given that it is not a "regular army grunt" job to scout the enemy in an ideal situation (again, IIRC). So, given that Fantasy Army has lost their first engagement in a rain of fire and brimstone (what it'd probably look like to them), they'll likely fall back, and either: call the adventurers or send in their more elite units to hold the dragon they poked. At which point, the ending becomes nebulous. Because, once more, we run into the reality of war. That it's impossible to really prosecute forever. And I can 100% see the US not really being willing to push the engagement into the other side of the portal, given the losses they'd take from Fantasy World's Nation. Yes, I believe the US would eventually pull a V. But it would be an extremely costly one, one that leaves them demonized in that world, and cities burning as they take them.
More than likely, we'll see diplomacy win out. Given that the OP hasn't stated that both sides have a cause they cannot back down from, I can see peace being formed between the two, and potentially, eventual friendship. Because, once more, we run into the problem of VS debates. I am given a scenario in which I don't know the context, and two polities (or characters) are fighting for some nebulous reason. My default response to that has always been and will always be "But Why?"