It would probably continue to travel into the star before it becomes one with UY Scuti. If the object is a neutron star, it could probably travel all the way into the center of the star, creating a Thorne-Zytkow object, a neutron star surrounded by a red giant