A slight modification in case the max value you are looking for is present more than once in the map:
// Find the entries with the max value in the map
val maxValue = map.maxBy(item => item._2)
// Filter the map and retain the entries with the max value
map.filter(item => item._2 == maxValue._2)