Adding foam fill to the mainframe of a replacement window is a waste of money.
80 percent of that window is glass. The only exception would be in extremely cold climates. Put your money into upgrading the glass. Also steel or aluminum reinforcment is key.