Does the internal energy of a thermodynamic system depend on the interaction of particles of the system with other bodies?

No, it does not depend, for example, a change in the height of the body’s position above the level of the Earth increases the potential energy of each molecule, but does not change their relative position, i.e. does not change the potential energy caused by the interaction of molecules with each other.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.