All user sessions being signed out when I delete a user from auth.users from the dashboard

I noticed that when I delete a user from the auth.users with the Supabase dashboard, all of my existing signed in sessions get logged out. This seems to happen because of an after delete trigger that I have set up on the auth.users table to cascade down several layers of tables to delete the related entries within those tables. Within the supabase postgres logs, I see errors:

"{\"component\":\"api\",\"error\":\"ERROR: relation \\\"users\\\" does not exist (SQLSTATE 42P01)\",\"level\":\"error\",\"method\":\"GET\",\"msg\":\"Unhandled server error: ERROR: relation \\\"users\\\" does not exist (SQLSTATE 42P01)\",\"path\":\"/user\",\"referer\":\"http://localhost:3000\",\"remote_addr\":\"209.122.120.128\",\"request_id\":\"9a8e88ada4f28fc1-BOS\",\"time\":\"2025-12-04T21:52:58Z\"}"

for a corresponding query of:
SELECT users.aud, users.banned_until, users.confirmation_sent_at, users.confirmation_token, users.confirmed_at, users.created_at, users.deleted_at, users.email, users.email_change, users.email_change_confirm_status, users.email_change_sent_at, users.email_change_token_current, users.email_change_token_new, users.email_confirmed_at, users.encrypted_password, users.id, users.instance_id, users.invited_at, users.is_anonymous, users.is_sso_user, users.last_sign_in_at, users.phone, users.phone_change, users.phone_change_sent_at, users.phone_change_token, users.phone_confirmed_at, users.raw_app_meta_data, users.raw_user_meta_data, users.reauthentication_sent_at, users.reauthentication_token, users.recovery_sent_at, users.recovery_token, users.role, users.updated_at FROM users AS users WHERE instance_id = $1 and id = $2 LIMIT 1


Note that I've only observed this logging out issue happen when I delete a user that has entries in my other tables. If I create a user manually within auth.users and then delete, this doesn't happen. How can I fix this?
Was this page helpful?