Help with timestamps when combining GROUP BY tag and MAX(field)

Hi. I’m trying to collect the max value of a specific field, for each value of a tag, stored within the last 5 minutes.
I was hoping something like this would work:

  select max(status) as status, msg, time
  from "1h"."healthz"
  where time > (now() - 5m)
  group by player_id

However, the results here return a timestamp which is the start of the bucket interval; i/e 5 minutes old. How can I get the specific point in time where the max(status) occurred?

Thanks!