Mason Greenwood is to leave Manchester United by mutual consent after conclusion of an internal investigation.