It’s not a matter of who owns the property, it’s a matter of who has the right to foreclose.
The government can foreclose on a property for failure to pay property taxes even though they don’t own it, right?
If the governing documents allow for such a thing, an HOA can do the same thing for failure to pay HOA dues or fines. There are California state laws that govern how and when an HOA can do this, but in general Yes They Can!