‘But’ or ‘however’ signal a 180˚ change in direction. They are symptoms of confused thought.
Using them makes it harder for audiences to follow (cp Amartyr Sen’s The Idea of Justice), because just as readers begin computing the first clause, the author contradicts with the second clause.
If you see a ‘but’ in your writing, then it’s better to re-write, either as two sentences or as one sentence focusing on your second clause.
n.b. Matt Winkler’s style manual The Bloomberg Way also proscribed ‘if’ alongside ‘but’. I can’t remember the reason, and find ‘if’ useful when instructing computers and humans.