Who keeps your passport while applying for visa extension in Japan

If I am applying for extension of stay, is my passport kept by the Immigration Office?
If I am allowed to keep my passport during the application process, can I go abroad temporarily while the application is in process?

Immigration Office does not keep your passport while you are applying for extension of stay. You can enter and leave Japan with a re-entry permit (including a deemed re-entry permit) even while you are applying for an extension of stay. However, you must re-enter Japan within two months from the expiration date of your stay.rom the expiration date of your stay.