WeWork, the shared office provider once valued at $47bn (£37bn), has warned it is at risk of bankruptcy as employees continue to work from home.