It depends on what you mean exactly.
Many instances of NP complete problems are solved optimally all the time, often quite quickly. See eg integer linear programming.
See entanglement chess ( https://entanglement-chess.netlify.app/help.html ) for an example of a problem that is not NP-hard despite looking that way at first glance.
Okay, but the optimal solution of any NP-complete problem is still at least superpolynomial in complexity. If "optimally" also meant general-case computationally feasible (polynomial) we would have proved P=NP.
Use an SMT solver or look into mixed integer linear programming solvers for some examples.
But its still not clear to me if this would be practically useful enough.