I used to have exactly this bug in my revolt Wordle chatbot. It's especially annoying when one of the duplicates is in the correct position but get's marked as BLACK since a previous repeat has been marked YELLOW.
(I don't think this can be classed as correct behavior)
( My revolt Wordle server: https://app.revolt.chat/invite/2q3NYtM9 )