To disable heads-up notifications, install Android SDK and issue the following command in command line (all in one line):
adb shell settings put global heads_up_notifications_enabled 0
To simply view current settings before or after changes, use:
adb shell settings get global heads_up_notifications_enabled
More ways on how to disable these settings (if not available via user interface) is located at xda-developers site.
P.S. This works on Samsung Galaxy S7 edge with Android 7.0 and Galaxy S8+ Android 7.0.