Sessions and signing out
A session lasts at most 12 hours from sign-in and ends after 30 minutes without you. Working keeps it alive within those 12 hours; nothing extends past them. When it ends, you sign in again, code included.
Signing out ends the session on the server, not just in your browser. An admin can end any session in the company from the security console, and disabling an account ends its sessions at once.
If you belong to more than one company, a code you entered in the last 15 minutes lets you into the next company without a second code. After 15 minutes the next company asks again. Each company still gets its own session on its own address; nothing is shared between them.