Is having One Withdraw on my transcript ok? (Transferring to EECS)

I’m currently a cs student at UCSD, looking to transfer into Berkeley for EECS. I’m currently taking an econ class(mainly out of interest), and due to a mix up on my part I thought I was taking it for P/NP but turns out I’m taking it for a letter. Its too late to change it, and now I am probably going to get a C/C+ in the class, best case scenario a B-/B. I currently have a 3.89 GPA and I’m afraid this will seriously lower it, which will affect my admission into an already super competitive major. Since this class is a non major course, I am thinking that it wont be too bad to withdraw, but I’d like to hear what others say. Is it better for me to ride out a C and seriously lower my gpa, or just withdraw and take it again later?