Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
Let me start by mentioning that I had connected to a VPN that may have bypassed the host file and thus correctly resolved the IP of the domains mentioned in the original post. Thus, by clearing the DNS cache, the popup is no longer showing up.
There are a few things that may not be correct with your post. First, you should follow the process discussed in the original post to edit the host file. However, I dont think you need to add the additional URL (in your case "127.0.0.1 https://jss.client-***"). The host file should not contain mentions of protocols such as https, but only the domain name that needs to be resolved statically to an IP.