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.
I would agree this is the case in combat, but in dialogues, you get to initiate the roll and reroll. It makes no sense to use the combat version of rolling in the dice rolling screen, especially when there is a reroll option the player can use.