But that's missing the point. You can be doing all of those things but your manager still may not like you. Admittedly they're probably more likely to like you if you're a good employee, but if they like you and you're a subpar employee you're going to be much better off than if they don't like you. And, if you're a stellar employee, you'll likely be presented with more opportunities/more favourable tasks/etc than a stellar employee your manager doesn't like.
You can take the view of "I'm doing my job" but don't be surprised if those around you who are more liked by management get picked up for promotions/etc more than you. Most people (management included) are not 100% objective in their decision making, and someone liking you (or not) is going to influence their decisions involving you.
The only question is, “Are you making them look good to their manager/customer/spouse/peers?”
Ultimately, that’s what you’ve been hired to do.
In a healthy context, you’re doing that by hitting your KPI’s, adding velocity, etc., but not necessarily.