If you try to reinstall an existing GN4 font, using the same font number, for example because the original font was imported with the wrong layout, or it's corrupted, the warning "Invalid font code" is displayed.
This simply means that you cannot overwrite an existing font.
Thus, first delete the existing font and then reinstall it as explained in Import fonts in GN4.
Note: it is not possible to reinstall all fonts at once. You have to delete and reinstall one-by-one.
Important
Reinstalling existing fonts during production time can cause various problems. Whenever possible, do such operation when no users are logged in.