Switching context only changes the pointer. If your token has expired or your certificate is invalid, kubectl commands will fail even after a successful switch.
You can modify a context so it always points to a specific namespace by default: kubectl config set-context --current --namespace=my-namespace kubectl use context