Hello MIKE 130 and Welcome back to the Wefugees Community!
Yes, you are right. The residence permit according to section 19d of the German Residence Act requires in general "[...] sufficient living space at his or her disposal". I am not very experienced with this type of residence permit, but I heard that some authorities may accept accomodation like a "Heim" for the 19d as well as long as the applicant is covering the costs himself/herself. However, I am afraid that this in not always the case and it varies across the federal states and municipalities. I will link my colleague dear @mbeon-Éanna here - maybe he can add some more information.
I highly recommend you to get in touch with a migration counselling office to get some individual support and to assess your case in detail. Maybe there are other options for you as well which might help you to bridge the time in which you are still looking for a flat (like the residence permit according to section 104c "Chancenaufenthalt").
All the best,
Meike