It would depends on the laws of the particular state, since each state has its own laws pertaining to voting. The law in North Carolina, N.C. Gen. Stat. §163-275(7), says that it is unlawful
For any person with intent to commit a fraud to register or vote at
more than one precinct or more than one time, or to induce another to
do so, in the same primary or election, or to vote illegally at any
primary or election
The corresponding jury instruction says what it means to have an intent to commit a fraud:
Intent is a mental attitude seldom provable by direct
evidence. It must ordinarily be proved by circumstances from which it
may be inferred. You arrive at the intent of a person by such just and
reasonable deductions from the circumstances proven as a
reasonably prudent person would ordinarily draw therefrom. Specific
intent is a mental purpose, aim or design to accomplish a specific
harm or result.
If you find from the evidence beyond a reasonable doubt that
on or about the alleged date the defendant voted more than one time
in the same election event, the (name election event or contest),and
that defendant did so with the intent to commit a fraud, then it would
be your duty to return a verdict of guilty. If you do not so find, or
if you have a reasonable doubt as to one or more of these things, then
it would be your duty to return a verdict of not guilty
The prosecution would presumably construct an argument that the defendant intended that is vote be counted twice, and if they can prove that intent, then the jury should convict. Defense could argue that the intent was based on a reasonable belief that their absentee ballot was not counted thus disenfranchising defendant, and defendant acted with the lawful intent that their vote be counted, once. Because NC law contains procedural provisions to filter out double-voting, defendant can reasonably have a non-criminal intent, even if they are mistaken about the efficacy of those safeguards.
However, the Ohio law does not carry an intent element:
(A) No person shall do any of the following: ...
(2) Vote or attempt to vote more than once at the same election by any
means, including voting or attempting to vote both by absent voter's
ballots under division (G) of section 3503.16 of the Revised Code and
by regular ballot at the polls at the same election, or voting or
attempting to vote both by absent voter's ballots under division (G)
of section 3503.16 of the Revised Code and by absent voter's ballots
under Chapter 3509. or armed service absent voter's ballots under
Chapter 3511. of the Revised Code at the same election;
This doesn't even require that you know that you are voting twice.
So it depends on the particular law of the state.