How can I remove/turn off shadows in macOS 10.14
The previous answers in your links all involve using SIMBL -- which is a third-party app that performs a variety of system 'hacks' or extensions. That (and the absence of any known defaults write key, suggests that removing shadows is not something that Apple have provided.