Scripting Switch User "Login Window" Click in Sonoma

In an attempt to emulate the old macOS behavior of the removed functionality
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
which would present the login window…

I have been trying to script clicking on “Login Window…” in the Sonoma Fast User Switching dialogue box for weeks.

SwitchUser
(User icons normally displayed have been removed)

I have no problem getting the popup to display, but can’t get anything even remotely close to functioning to click on the Login Window item.

Ideas?? Or, preferably, solutions???

HELP!!

Thanks in advance!

(I have previously posted this question twice to Apple Community Forums, only to have it disappear. The first time I thought maybe I had a brain hiccup and didn’t actually post it. The second time, after posting it, I verified it posted. Then, I monitored it for a while, and after two hours it was gone–someone had taken it down and I was never told that it was removed or why. So, I guess someone at Apple doesn’t want this question answered!)

Try this

tell application "loginwindow" to «event aevtsclk»
tell application "System Events"
	tell application process "loginwindow"
		repeat until exists (button 1 of window "Login" whose description is "Switch User")
			delay 0.2
		end repeat
		click (button 1 of window "Login" whose description is "Switch User")
	end tell
end tell