By searching the solution to disable shadows in MacOS, I found an answer defaults write com.apple.screencapture disable-shadow -bool true
But it does not work in the latest MacOS - Big Sur
How do I disable shadows of windows in MacOS Big Sur?
By searching the solution to disable shadows in MacOS, I found an answer defaults write com.apple.screencapture disable-shadow -bool true
But it does not work in the latest MacOS - Big Sur
How do I disable shadows of windows in MacOS Big Sur?
I've searched for years for something that works. As I use an inverted screen, the shadow is bright white and drives me nuts. This is the only thing I've found that comes close to working: https://github.com/w0lfschild/winBuddy
It is a bit flaky and messes up firefox tabs and ms office
If someone finds a better solution, pls let me know
Install MacForge (https://www.macenhance.com/macforge.html) and search for noShadows from the market (it's all free). I have tested on Big Sur and it works like a charm. See my examples below

PS: you will have to disable stuff like System Integraity Protection and Library Validatiion, as suggested as the startup of MacForge.
You can remove the border and drop shadow by holding down the Option key while clicking. This lets you retain it when you want and disable it otherwise. The default macOS screen capture of a window includes a border and drop shadow (top), but you can easily change this for each capture or permanently (bottom). Click the green button by the question if you accept the answer and it helped you.
The information came from here