This issue was addressed through improved state management. This issue is fixed in macOS Sequoia 15.1, macOS Sonoma 14.7.2, macOS Ventura 13.7.2. A user with screen sharing access may be able to view another user's screen.
https://support.apple.com/en-us/121842
https://support.apple.com/en-us/121840
https://support.apple.com/en-us/121564