What I'm trying to do is play Netflix and other streaming services on my MacBook Pro 2023 M2 Max Tahoe and "cast" it to my Sony Bravia 8 TV
Netflix is one of a few select content providers that tries to block AirPlay, in any form, from any device. They don’t want you to do that, unfortunately.
Having the Apple TV box means you don’t have to use AirPlay or casting for certain things, as the Apple TV box has it own apps, including apps for most streaming content providers, so your Mac doesn’t have to be involved. I highly recommend it.
If you want, you can still stream wirelessly from Mac to the Apple TV box for content providers that do support AirPlay from Mac. The Apple TV app on Mac and the Amazon Prime Video app on Mac do support AirPlay, for instance. Not needed per se, as those apps also exist on the Apple TV box.
Browser content may get blocked for certain providers, as they can opt to block capturing.
[The Chrome browser may support direct casting (Chromecast/Google Cast) as different from AirPlay, and not compatible with the Apple TV box. That may or may not bypass some blocking. Any sync issues from that are with those developers, not Apple.]
Smart TVs also have their own apps, again including Netflix, so you wouldn’t have to stream Netflix or other streaming services from your MacBook Pro. The Apple TV box interface may be nicer, faster, and more smooth than what a smart TV brings, and offer other Apple ecosystem benefits.
AirPlay causes the audio to be several seconds out of sync.
Sorry to hear that. That is not my experience. When both audio and video are streamed, then both should stay linked for timing when arriving at the Apple TV box, and then at the TV.
If I buy an Apple TV box (I guess I'll get the 128 GB one, it's only $20 more), will I be able to "cast" to it from my MacBook Pro and have no sync issues?
You should be good for sync, but I’m not sure what went wrong with your sync before.
There is a 14-day return window (in most countries) when purchased from Apple directly, in case it doesn’t work out for you. I hope that won’t be needed, as I hope you’ll love it.
I'd love to be able to use "casting" for my non-linear editing programs like Avid as well. Would those stay in sync also?
AirPlay Screen Mirroring is supported system-wide for any app that doesn’t block it, including video editing apps, but there is a short delay (screen capture, scaling, re-encoding), so it may feel slow/less responsive (keyboard/trackpad to result). Personally, I tried AirPlay Screen Mirroring with (action) gaming, and found the delay unacceptable for that use. Then HDMI is better/faster. But that is unrelated to audio-video sync, when both audio and video get send to the Apple TV box, then to the TV.