A refusal and a kindness, in the same sentence
Qur'an 31:15 is the verse this whole subject turns on, and it deals with the most serious case there is. If they strive to make you associate anything with Allah, do not obey them, and accompany them in this world with what is right and good. 29:8 says the same thing again.
Look at the structure. A refusal of obedience and a continuation of good companionship, in one sentence, about the worst demand a parent could make. The refusal does not cancel the kindness and the kindness does not require the compliance.
Then the report below, on the general principle. Obedience is in what is good. Its original setting is a commander and his men, and applying the principle to a parent's instruction is standard among the jurists rather than something new, though the sourcing of that application is a scholar's job and not ours.
Qur’an and Sunnah
وَوَصَّيۡنَا ٱلۡإِنسَٰنَ بِوَٰلِدَيۡهِ حُسۡنࣰ اۖ وَإِن جَٰهَدَاكَ لِتُشۡرِكَ بِي مَا لَيۡسَ لَكَ بِهِۦ عِلۡمࣱ فَلَا تُطِعۡهُمَآۚ إِلَيَّ مَرۡجِعُكُمۡ فَأُنَبِّئُكُم بِمَا كُنتُمۡ تَعۡمَلُونَ
We have commanded people to be good to their parents, but do not obey them if they strive to make you serve, beside Me, anything of which you have no knowledge: you will all return to Me, and I shall inform you of what you have done
Qur’an 29:8
وَإِن جَٰهَدَاكَ عَلَىٰٓ أَن تُشۡرِكَ بِي مَا لَيۡسَ لَكَ بِهِۦ عِلۡمࣱ فَلَا تُطِعۡهُمَاۖ وَصَاحِبۡهُمَا فِي ٱلدُّنۡيَا مَعۡرُوفࣰ اۖ وَٱتَّبِعۡ سَبِيلَ مَنۡ أَنَابَ إِلَيَّۚ ثُمَّ إِلَيَّ مَرۡجِعُكُمۡ فَأُنَبِّئُكُم بِمَا كُنتُمۡ تَعۡمَلُونَ
If they strive to make you associate with Me anything about which you have no knowledge, then do not obey them. Yet keep their company in this life according to what is right, and follow the path of those who turn to Me. You will all return to Me in the end, and I will tell you everything that you have done
Qur’an 31:15
Narrated `Ali:The Prophet (ﷺ) , sent an army and appointed some man their commander The man made a fire and then said (to the soldiers), "Enter it." Some of them intended to enter it while some others said, 'We have run away from it (i.e., embraced Islam to save ourselves from the 'fire')." They mentioned that to the Prophet, and he said about people who had intended to enter the fire. ''If they had entered it, they would have remained In it till the Day of Resurrection.'' Then he said to others, "No obedience for evil deeds, obedience is required only in what is good
Sahih al-Bukhari 7257graded sound, sahihaynfull report
Translation: M.A.S. Abdel Haleem, The Qur'an, Oxford University Press, 2004.