Work permit in progress document used on a border

Hello,
my work visa and temporary Costa Rican residence is in progress and I have received a document that proves that. I have been told by the lawyer and my consulate that I do not need to leave the country and I can overstay my 90 days tourist visas while the case is opened. But what if I do want to leave the country (to Panama or Nicaragua) for a vacation. Will I be asked for the proof of onward travel from Costa Rica or will that document satisfy the immigration officers when crossing back?
Anyone has tried?

Not having to leave the country once you have your comprobante (paperwork) will be acceptable, while stay within the country, however once you do a border run, you are required to show a return ticket. Unfortunately, Panama seems to require a ticket back to your 'home country'. Nicaragua accepts a bus ticket...

Ok. Thanks. Is it the authorities of Panama requiring a ticket out of Panama when entering or it is the Costa Rican immigration? If it is Panama then it does not make sense to arrive by car and have a ticket out by plain. And if it is Costa Rica, it does not make sense they do not accept their own papers issued by immigration here. But I know things do not need to make sense here... I was planning to go by own car with Costa Rican plates to Bocas del Toro and have a bus ticket reservation from Costa Rica to Nicaragua as a proof of onward travel from Costa Rica. But from what you say it seems too risky. We are family of 4 and buying tickets back to Europe only to show at the border is too much.

Yes, it is the authorities of Panama requiring a ticket out of Panama.

Check out this website, especially under 'Border Crossings'.

Kohlerias, thank you for your answers.

Your are welcome. I did come across this site today that explains  'how to do it' even better, while trying to find something else

Thank you. Do you know whether with the work permit and the temporary residence that comes with it you still need to provide a proof of a ticket back to the home country when travelling to Panama? And whether  you still need to have a bus ticket from Panama back to Costa Rica when crossing the border by car (with all the paperwork needed)?

Most likely...but one never knows what 'rules' will apply that day  :unsure since that is supposed to be the case.
Once you have your cedula/work permit in hand, you shouldn't have  to produce the ticket 'home'