Tories accused of ‘making a mockery of democracy’ in North Yorkshire after losing majority