Not sure how you can do this on the mac…but in the windows version there is this:
You could try setting a fixed resolution in kodi as well.
System, System, Video Output, Resolution
I think setting up a fixed resolution will solve your problem since its a headless pi.
If that doesnt work…then you have to do it in the config.txt
Check this page…and search for : Set monitor resolution to 1024x768 XGA 60 Hz
You’ll need : hdmi_drive,hdmi_group and hdmi_mode (check your tv first…what types it can support, in case you ever plug a tv on it)