I think its case by case. I did both. I got a C+ in biochem 1, took biochem 2 and got an A-. In interviews if the interviewer asked if there was anything I wanted to explain on my transcript, I brought up how I was overloaded that semester, mom was sick, etc and then how the next semester I re prioritized, learned from my mistakes, and earned an A- AND took the class as an honors course.
But I also retook gen chem my senior year. I got a B- in it as a freshman, had extra credit space, and there wasn't another upper level class that worked with my schedule. It was an easy easy easy A but no one seemed to question or care about it. Got into both MD and DO schools so I don't think it hurt me.
All that to say, if you're able to crush a different upper level, do it. If you dont have time/cant fit one into your schedule/and its the ONLY class you're retaking, go for it. I dont think it'll kill you. If you've already retaken one or more courses, probably not the finest idea.