When I play a DVD, screen mirroring does not work
Apple has HDCP DRM protection for playing DVDs. This means that they also block screen mirroring when watching DVDs. You can download and install VLC to play the DVDs.
VLC can be found here: https://www.videolan.org/vlc/download-macosx.html