Sony please upgrade Xperia XZ to Oreo 8.1. Apparently notification spam (the flood of notifications you get at the end of DND) Has been fixed in 8.1. See this article from android police :
http://www.androidpolice.com/2017/10/25/android-8-1-feature-spotlight-apps-can-now-make-notification...
This is an extremely annoying bug!