Massachusetts continues to lose residents amid high housing costs and the broader availability for workers to do their jobs remotely.