Managing "Hearts" when downloading pictures from iPhone to OSX Photos
I don't believe it's possible to plug your phone into your computer and keep your favorites, however you can use iCloud Photo Library to save your photos to the cloud and then sync them to your Mac. Here is a link to a site telling your how exactly to do that. FYI, syncing photos sucks a lot of cell data, so make sure both devices are connected to wifi or Ethernet!