Home prices have increased in 48 of the 50 largest U.S. cities, even with high mortgage costs squeezing out potential buyers.