Frictional transition from superlubric islands to pinned monolayers