The stay is on eviction, i.e. forceful removal of the tenant. If Sheriff show up to evict, the tenant can show him the bankcryptcy paper and Sheriff WILL go away.
Whether you seek unpaid rent has nothing to do with eviction. If you give up claim on past rent, that's it. However, if you continue to seek unpaid rent and got a ruling, you become the tenant's judgment creditor. That means you have to go to bankcryptcy court, stand together with the tenant's other creditors, such as credit card, student loan, car loan banks etc. All creditors will negotiate a fair share of tenant's asset, or a portion of tenant's future income to cover his debt. This process is called debt restructuring.