Some young people receiving mental health care in hospital are being moved to settings like bed and breakfast hostels and caravans on holiday sites when they turn 18, an investigation has found.