For many people, a simple reboot fixed the Discord screen-sharing issue with no audio problem.
Reset Voice Settings of Discord
It’s also possible that Discord’s voice settings have been corrupted. As a result, it is suggested that you try resetting the Discord Voice Settings to get it
Do Not Use Full Screen
The sound on Discord shows to be distorted as a result of the full-screen mode. To fix the problem, simply minimize the window while screen sharing an app or a game on Discord.