If I fraud someone, invest their money and pay it back is there any criminal offense? Does fraud require damages? Will most judges realistically treat this a criminal case?
If a person is wrongfully deprived of money (or something else of value) for a period, that is damage, even if the money is later repaid. The victim might have used the money in some profitable or advantageous way during the period when it was taken. But the victim need not prove exactly how s/he might have profited, it is enough to show that the victim was wrongfully deprived of something of value.
Of course, there are other elements to fraud. There must have been a lie or deception, on which the victim reasonably relied. There must have been intent that the victim so relay. The deception must have been material and must have directly caused or led to the damage. (Or have gotten the Fraudster a benefit that would not have been provided had the victim known the truth.)
But assuming that all the elements of fraud are proved, restitution, even full restitution with interest, does not excuse the fraud.
However, as a practical matter, if offered full restitution on condition of a release or an agreement not to prosecute, many victims will choose to take it, preferring their money back, perhaps with interest, to a legal case, even a winning one.
You say "criminal fraud", if you mean exactly that, then no, returning the money, or offering even more money, will not be a defense.
You committed a crime and can be convicted for it even if you gave back more money than the complainant had "lost".
There may be a case for if someone initiated civil proceedings against you on the basis of fraud, since you can simply pay whatever damages that person may seek, and settle the claim.