Do Newtonian mechanics and thermodynamics have different definitions of internal energy?

Maybe the crux of the issue is what the word "internal" should include, rather than on "thermodynamic" versus "Newtonian."

If we're considering a gas in a container sitting in a lab on the surface of the earth, we might choose to consider the earth's gravity as an "external" influence (because the earth itself is "external" to the system of interest), and then we would not include gravitational potential energy in the "internal" energy of the gas.

On the other hand, if we're considering a gas whose "atoms" are stars in a cluster of astronomic proportions, then we would consider their mutual gravitational interactions as "internal" to the system, and therefore we would include the gravitational potential energy. By the way, this is an interesting example in thermodynamics, because this system has a negative heat capacity: adding energy makes it colder. (This is related to the prediction that an evaporating black hole gets hotter as it gets smaller.)

Whatever language we use, the key point is that we separate all the stuff in the scenario into two categories: one category is the stuff whose behavior we're interested in, and the other category is all the other stuff that might influence the behavior of the stuff that we're interested in. The words "internal" and "external" are sometimes (but not always) used to distinguish between these two categories. Sometimes the word "system" includes both categories, and sometimes it only includes the first one.