Shared Google Drive folders in Google Workspace are backed up from the folder owner.
If a folder is shared with another user (user B) and this user creates a sub-folder there but doesn't share it with the owner of the root folder (user A), then that sub-folder will not be backed up in the root folder owner's account (user A) until the sub-folder is shared with him.
If the user B also has backups enabled, the folders shared with him/her are not backed up unless moved from the "Shared with me" section to their own Drive. Once moved, all of them will be backed up.