Manifestation of the long-range interaction in processes of ionization of excited atoms in thermal and subthermal collisions