It's a real stretch of the imagination to call 2003 YN107 a moon of the Earth. Although it just left Earth "orbit" a few weeks ago ago, last year when it was "orbiting" Earth, if the Sun had suddenly vanished, the Earth and Moon would wander interstellar space together as a pair. The Earth would not lose its grip of the Moon. The Earth and 2003 YN107 would part ways forever. The Earth would lose its "grip" on 2003 YN107 because it never had a grip to begin with.
2003 YN107 temporarily orbited the Sun in a 1:1 mean motion resonance with the Earth, in the vicinity of the Earth. It only "orbited" Earth in a rotating frame of reference. In a non-rotating frame of reference, it usually "orbits" Earth in the same sense that Jupiter "orbits" Earth. Earth is interior to Jupiter, therefore, Jupiter is constantly travelling around the Earth. So for the last ~9 years, in a non-rotating frame of reference 2003 YN107 stopped "orbiting" Earth and started tracing a crazy trajectory in Earth's vicinity that didn't go around the Earth. But in the rotating frame of reference, it spent these 9 years "orbiting" Earth.
Screen shots: (Earth, blue dot in center, orbit of Moon, gray circle around Earth, trajectory of 2003 YN107, purple.
In a non-rotating frame of reference, 2003 YN107 spends years spiraling closer to the Earth, then enters a temporary 1:1 mean motion resonance with Earth for 9 years.
In a rotating frame of reference, rotating with Earth's period, the eccentricity of 2003 YN107 causes it to create loops as it orbits the Sun and encroaches upon Earth's position. Then as its loop encompases Earth, it is prevented from advancing further, and it is locked into a 1:1 resonance with Earth. 9 years later, a close encounter with Earth permits it to escape this resonance.
