In order to mirror screen with sound, you need:
1. Install JustStream Audio Driver.
JustStream Audio Driver is a virtual audio device that captures the output sound and loops it back as an input to Mac. As a result, JustStream app is able to record your computer’s screen along with system audio and send them as a single stream to the TV. Such kind of loop-backed input macOS recognizes as a microphone and that is why the application requires access to it.
2. Allow the application access to the microphone (if you're using macOS 10.14 or later).