Generally hosting is charged by the KW and not by the space it consumes so ther would be no difference in cost for requiring more rack space
Well generally it is charged by both.
Also the more important Criteria is cooling. Generally there is a limit of 8-10 kW per rack and usually it's less than 10 KW per rack. Few data centers allow more.
Many do if you are using a private cage. Depending on the provider you can get up to ~25 KW (two 60A 208 drops). Beyond that is probably going to require three phase.
Thus you will be sparsely populating these Bitcoin mining equipment on the racks with plenty of air in between regardless of 2U or 4U box size so in practice it would take the same amount of rack apace regardless of box size. And cooling these power hungry chips is very important cos they're temperature sensitive and run faster when they're cooler.
If you are putting 1 U space between units then it is 3U vs 5U still means less units per rack. At 5U (4U unit plus 1U space). You are looking at only 8 units per rack. If it is 2 TH/s and pulls 0.8 J/GH (at the wall) it is "only" 12 KW per rack. Granted it isn't the end of the world and for most users it probably makes no difference but it does mean less density. I though 1 TH/U was pretty aggressive.