Anyone who says that a black hole has infinite density is being rather loose with their language. The normal definition of a black hole is something along the lines of a region of space where gravity is so strong that no matter or energy can leave the region. Such a region of space can be represented mathematically as having at its center a singularity with infinite density, but it’s just a mathematical model. Since nothing can leave, the only actual observations we have are from outside such regions, not inside.
An analogy would be to examine an old locked trunk found in an attic to determine what it contains. We can shake it to hear what sound it makes, weigh it to get an idea of what might be inside, or even xray it. If we get no results whatsoever (no sound is recorded when it’s shaken, no weight is recorded when it’s weighed, no xrays come out the other side when it’s bombarded with them, etc) then all we can do is guess. We can formulate all kinds of hypotheses about what its contents may be, but all we have to go on is what we are able to observe from the outside. Unless we have a way to observe the inside of the trunk, there’s no way to know if any hypothesis we come up with accurately represents the reality of the inside of the trunk.
Stating that a black hole has infinite density is to assume that the theory of general relativity is the same whether or not the gravitational force of a particular region is strong enough to prevent matter or energy from leaving. We simply do not know if that is the case.