Generally, if two transition words have similar meanings, they can’t both be right.
But remember that parts of speech matter.
“However” is an adverb, specifically, a conjunctive adverb. It cannot join two independent clauses with a comma alone. A period or semicolon is required for two independent clauses. Sometimes a colon will work: This sentence one example.
OK. Back to “But.” “But” is a coordinating conjunction; it can join two independent clauses.
People think “however” is a conjunction, but it’s not; it’s an adverb, specifically a conjunctive adverb. Adverbs can’t join independent clauses. If you can move the word around the sentence, it’s not a coordinating conjunction. Indeed, “however” can be moved around. “However,” indeed, can be moved around. “However,” can indeed be moved around. “However” can be moved around indeed. Like “indeed,” “instead,” “therefore,” and many other conjunctive adverbs, “however” can be moved around; it is, therefore, a conjunctive adverb.
Correct: I was tired; however, I finished the race.
Correct: I was tired. However, I finished the race.
Correct: I was tired; I did, however, finish the race.
Correct: I was tired. I did, however, finish the race.
Correct: I was tired; I did finish the race, however.
Correct: I was tired. I did finish the race, however.
Wrong: I was tired, however, I finished the race. (“However” is merely an adverb. As it’s not a conjunction, it cannot join the two independent clauses separated by only a comma. It requires a period or semicolon)
Correct: I was tired, but I finished the race. (Note that “but” cannot be moved around. It’s a coordinating conjunction and must be in the middle. It correctly joins two independent clauses separated only by a comma.)