This response could wind up a little long, sorry...
There is no black and white answer to this, but there is plenty of gray area in the middle for sure.
Me, personally, I'm a note for note person, and at home learning the song, that's fine. But in reality, it doesn't work that way about 97% of the time, even for those who originally recorded the song in question.
Example of that last statement:
Kenny Wayne Shepherd's "Blue On Black"
I needed to learn that song for gigs, so...
I learned the song, note for note, as it was recorded.
Then I watched a video of it live on youtube. Uh oh, the bass line is different from the original.
I then watched another video of it live, but this time the Kenny Wayne Shepherd band was using a different bassist than in the other live video. And this time the bass line was different from both the original recording, and the first live video that I had watched.
My solution to this dilemma?
I took parts of the bass lines that I liked best from the 3 versions, and combined them into one. Now, the roots were all the same, but there were little riffs here and there that were different from each other. And all 3 versions contain a "bridge" of sorts where the song drops to F near the end of the guitar solo.
To me if you're playing the basics of the song as far as chord progression, and that's for all instruments, and you include the drop to F near the end of the guitar solo, you're fine. But if you don't include that F, then you're leaving out a piece that is integral to the overall feel of the song, especially the ending of the guitar solo. I've seen bands play it both ways, and I choose to include it, and my bandmates agree with me. It's not the same without it.
---------------
Then there are songs, that as a bassist, I feel you better play it note for note because the bass is so standout, the line so recognizable, that even a slightly inebriated bar room audience will notice.
Example: Michael Jackson's "Billie Jean"
Aside from the vocals, the bass and drums are the meat of that song. Can you get away with not playing it note for note in some parts of it? Yeah probably, but the meat of it, no, definitely not.
I've seen it done once where it was not done as the original, but yet it was as good as the original, and that was done by a soloist acoustic guitar player in Eastern Europe. That's one of those exception's, not the norm. And not something you're most likely going to run into when out gigging in bars.
------------------
As someone who considers themselves to be a music aficionado, a note for note player, and a complete arse of a perfectionist to the point I tick people off sometimes, a lot of times actually, I have had a hard time accepting these "modifications".
No, No, No, you're doing it wrong, it's like this, now do it again or get off my lawn!
But I'm changing, and for the better I might add.
Aside from starting a band last year, and reinventing it with a new lead vocalist/rhythm guitar player in the last 6 weeks, as well as starting another band during this time that just fell through the cracks... I've written original bass lines for several local artists and their recording projects as well as going out on a Friday or Saturday night when I'm not playing, and being invited to sit in with other bands for a song or two.
I even get the occasional call, hey we're throwing something together for a show, can you play bass? Yeah? Great! Be there in 6 hours. Why do I get such calls? Because other musicians know that I'm really not an arse and I can be flexible. And that as a bass player I can hold the bottom end down however they want me to do it.
If you had told me 42 years ago, yes 42, that I would be improvising bass lines, or heaven forbid, playing a little country even, I would have told you no way and walked off laughing. Guess I'm not getting the last laugh there as I'm now doing both of those things. I started playing at a very young age, 11, and everything has been set in stone for me for so long that the last 16 months of change has made me a very different person in music and in life.
This "jamming" with such a diverse group of musicians has made me appreciate the "do what you gotta do to get it done while doing your best, and being a professional" vs "we have to do it note for note as it was recorded." It has opened up not only my playing, but my attitude about life.
----------------
Learning to live with a gray area, and that not everything is always black n white, actually makes life easier. In music, sometimes it works for the best, even better than the original and sometimes it doesn't. Only you, and your bandmates, can decide what works and what doesn't, when it comes to covers that you do.