Ramanujacharya did not abandon his Guru Yadava Prakasha. Yadava Prakasha himself ordered to leave the school. So, he was following the command of his teacher.
Let's see what happened.
Hearing that his maternal cousin Govinda (who was known later as Embar) was studying at Yadava Prakasha, he joined there too. In the course of the studies, there was a lesson about the Taittiriya Upanishad passage.
सत्यं ज्ञानमनन्तं ब्रह्म [Taittiriya Upanishad 2.1.1]
which means "Brahman (God) is Truth (satyam), Knowledge (jñānaṃ) and infinity (anantaṃ) "
Yadava Prakasha explained this upanishad mantra as follows:
But Yadava said that the attributes of Truth, Knowledge and infinity could not co-exist in Brahman, inasmuch as broken hornness, horn-lessness and full hornness, could not co-exist in a cow, for example; a cow cannot have broken horns, hornless and be fully horned at one and the same time; and
therefore Brabman cannot simultaneously possess various attributes. Brahman with attributes was therefore a logical impossibility.
Then Ramanuja could not agree with his teacher's explanation of Upanishad's statement and said it was misinterpreted to suit his imaginary Brahman. Yadava Prakasha challenged Ramanujacharya to give his own explanation.
Ramanuja argued thus :—“To begin with, a sentence cannot mean otherwise than what it is intended to mean. “That Brahman is Truth etc.” is what is evident in this passage. It does not run thus:—” Brahman is sot Truth,” so as to make Brahman devoid of any attribute, thus reducing It to a non-entity. And then, if there is Brahman, It must have attributes ; for nil attributeless Brahman can have no existence (truth). A thing must be some-thing, not no.thing. And thirdly the attributes Truth &c. are not inconsistent with each other so as to preclude their co-existence in Brahman, such as the consistency of light and darkness co-existing in space for example. The attribute Truth is meant to show that Brahman exists not at one moment merely, and ceasing to exist beyond that moment. Brahman is Truth is therefore intended to establish Brahman’s existence in eternity, or Its eternality, in time. Brahman is Knowledge is next intended to establish that Brahman is Spirit, for Knowledge means thought. Thought means Intelligence, Sensate-ness and so on. And thus Knowledge is an inseparable adjunct of Brahman, for otherwise Brahman would be no Spirit, but simple non-intelligent or non-sensate or non-thinking stuff like lifeless matter. Brahman is Knowledge therefore establishes that Brahman is Spirit or Life. Brahman is Infinity is next intended to establish that Brahman is without limits or conditions, or Its infinity in space and mode. Truth therefore is the term which characterizes Brahman as Eternal, distinguishing It from what. is non eternal; Knowledge is the term which
characterizes Brahman as Spirit or Life, distinguishing It from what is non-spirit or own-life; and Inifinity is the term which characterizes Brahman as Infinite, distinguishing It from what is non-infinite (or conditioned by space-limits or naode4imits). And these attributes and infinite others can co-exist in Brahman without mutual contradiction, as redness, softness, perfume &c., can harmoniously exist in the flower. The analogy of the cow is not appropriate here and the analogy of flower as quoted above or the analogy of sun having light and heat co-existing are appropriate here. And therefore try to postulate an attributeless Brahman, or a Brahman in whom different attributes cannot co-exist, is neither logical nor consistent with the affirmatory character of the Vedic Passage in the question.
To this Yadava simply said in disdain "Thou, to argue with me?" and kept silent.
Another incident was about Chandogya upanishad's statement "tasya yatha kapyasam pundarikamevamakshini". This is already explained in this answer by @KeshavSrinivasan.
After these incidents, due to Ramanujacharya's intelligence, he considered him as his rival, who would be say superior in learning, subversive of his philosophy advaita; in short who would damage his reputation as a teacher in the land and a possible revolutionist who would put an end to.
Thus thinking, be called together those disciples who were after his ways and said: “Look, all of you do quietly subscribe to my views, but this Ramanuja alone is adverse and perverse and entertains opinions opposed to mine. He is likely to become our declared enemy. Can you devise some means by which to do away with him? They suggested many ways of disposal, but none of them recommended itself to Yadava, am it meant sinning, for which SAstrAs declared that one must expiate and suffer; sad secondly in whatever way Ramanujacharya was to be done away with, that must be above suspicion. After much consultation and deliberation they pitched upon a plot, viz., to invite Ramanujacharya back into their fold, treat him as their best friend—is one without whom they could not bye— and then they would set on a holy pilgrimage to Varanasi (Benares) and there drown Ramanujacharya in the Ganga (Ganges) river, near Manikarniki-ghat— the ostensible object being pilgrimage, the real one being Ramanuja’s death—death
which, taking place in the Holy Ganga, would be counted as an affair of merit which they thought would not involve the actors in am What travesty of spiritual ethic., by Yadava!! A veritable whited sepulchre be must have been.’
After some days, Yadava announced the Varanasi pilgrimage but the main motto was to get rid of Ramanujacharya. However, taking the hint given by his cousin Govinda, Ramanujacharya managed to save himself from Yadava's disciples. Lord VaradaRaja rescued Ramanujacharya from forests and took him to Kanchipuram.
After reaching KanchiPuram, Yadava was surprised to see Ramanujacharya. He reaslised that he was no ordinary man. His hate turned towards love.
Even after this incident, Ramanujacharya continued to study under him. After some days, there was a discussion between Yadava Prakasha and Ramanujacharya about Chandogya Upanishad statement "Sarvam Khalvidam Brahma".
After this Yadava Prakasha at last said in anger
As obstinately as Yàdava preached his pautheism, so obstinately did Ramanuja rebut him. Yàdava got enraged at last. “No more can you read with me, Sir” lie cried, “you must henceforth find your own congenial teacher.”
Ramanujacharya happily took the leave of Yadava Prakasha. So, he did not abandon his first Guru Yadava Prakasha. He left him on his command.
Even when Ramanujacharya met Yadava Prakasha in his later life, he respected him with great reverence because he was his first Guru. Yadava Prakasha became the disciple of Ramanujacharya and gets the name Govinda Jeeyar.
From The life of Ramanujacharya : the exponent of the Visishtadvaita philosophy by Govindacharya, Alkondaville