Advantage is not the same as re-rolling after a failure. It is a simultaneous roll of 2d20, choosing the higher. Presumably, the game is doing this under the hood and only showing you the highest result.
In your case, your two rolls were {6, <6} so the game chose 6 as the higher option. Unlucky, but it happens.
I assume that medicine check "Use the highest roll from 1d20+2" is just worded improperly. You're right that it should say "use the highest roll from 1d20+2 rolled twice"
Unfortunately there's no way to check if the game is actually rolling 1 or 2 d20s without recording dozens of rolls w/Advantage and doing statistics on the results. I would like it if the game showed you both rolls when you rolled with advantage/disadvantage, as this would be easier to understand by players.