I think there was a Good Eats episode, that tomatoes actually lose flavor if refrigerated - some chemical change, don’t remember the details.

Does it regain the flavour in the same way chocolate does when brought back to room temp, or does it lose flavour permanently?

Unfortunately no.

The cold degrades some molecules involved in the flavour of the fruit.

But also yes. There may be some loss as you describe , but they’ll taste better brought back till room temperature than straight from the fridge .