When the search gate appears, if the query contains a session token, it goes /?q=... -> /search?=... -> /?q=... and the /search part messes up the url and double encodes it showing the raw url param from the first request.
https://kagi.com/?q=test+test 
https://kagi.com/?q=test+test&token=test 