Did you ever get this working?
You say your issue is the same as that older (locked) discussion, but that person was fine until installing the Cisco VPN client (even after uninstall, but...). Sadly, no one ever told that poor soul to do this (same thing happens and same setting is needed when trying to print to a wifi printer also on the local wifi):
https://www.cisco.com/c/en/us/support/docs/security/secure-client-5/221024-configure-local-lan-access-for-secure-cl.html
If you are also using a VPN client, that's definitely an issue, as the point of the VPN is to virtually make a private network between your device and the destination server to which the VPN client connects, isolating it from the local network or ISP's network (without setting otherwise, as per the Cisco link, above). This would be true of any VPN, not just Cisco's (depending on how any given VPN client handles local network access, like Cisco's checkbox preferences option does).
Otherwise, just a thought, but what macOS is your MacBook Pro running vs. your iMac?
This thread pre-dates Sonoma, but similar symptoms as our different issue, where all of our Sonoma Macs can see our single Chromecast perfectly fine 100% of the time, but a 4K Apple TV -also on the same network, and all of which has worked perfectly and seamlessly for YEARS!- is only seen rarely/intermittently by all Sonoma (14.5) Macs now. Monterey Macs still work 100% of the time without issue, and all on the same, otherwise fine network (run via Apple's last model of Apple AirPort Extreme no less). Haven't tried Ventura, but it's closer to Sonoma than Monterey, so we're hoping to find a solution before Monterey goes EOL later this year.
"It just works!" is clearly no longer anywhere near what it used to be -if in any sense whatsoever- with Apple products any longer...not just with a Google Chromecast.