Firstly, let me conduct a thought experiment: Let us take a random brother in Islam called A. Don't you love Abu Bakr (RA) more than you love A? I definitely do. Why? Because of Abu Bakr (RA)'s actions. Now let us take a random non-Muslim brother in humanity called B. Don't you love B more than you love Abu Jahl? Of course. Because of Abu Jahl's actions.
So, you see, actions that are chosen willingly with the proper knowledge are very much the fault of that person themselves and it is valid to dislike such a person. Do you treat a murderer equal to a non-murderer because you only dislike the murder not the person himself? It simply doesn't make sense.
But, the distinction that is done is that no living person should become hated beyond redemption. This is because the fact that Allah has kept them alive tells us that Allah thinks they have a chance at redemption. This concept is explained in the following hadith:
"Love your beloved moderately, perhaps he becomes hated to you someday. And hate whom you hate moderately, perhaps he becomes your beloved someday." (Jami` at-Tirmidhi)
(Notice also how the Prophet (SAW) doesn't admonish people from hating. Just hating excessively.)
So, what needs to be taken away is that there are layers of love. The base level is you love a person for them being your brother in humanity and having a chance at goodness. So you must work with that person to bring them towards goodness and pray for their guidance. Then either that love deteriorates because of their sins or increases because of their goodness. But there must always be a small amount of love as long as they are alive.
Thus, you should definitely not love a person equally once you find out he is committing a sin. If you do, you need to look into yourself and recheck your priorities. Why do you love this person so much that them being sinful doesn't take away from that love at all? Be careful of idolatry. You don't need a literal idol in front of you to commit it. A Muslim must love only for the sake of Allah.
The Prophet (ﷺ) said: If anyone loves for Allah's sake, hates for Allah's sake, gives for Allah's sake and withholds for Allah's sake, he will have perfect faith. (Sunan Abi Dawud)
Note: Only the act of homosexuality is considered a sin.