Yes. Once your British citizenship application has been submitted, you can travel outside of the UK while it is being considered. As a part of your application, you can submit a certified copy of your passport and keep the original in order to travel.
Your application will not affect your immigration permissions, but you will need to demonstrate entitlement to re-enter. You should travel with evidence of your relevant immigration status.
Keep in mind that you need to enrol your biometric information within 45 days of your Naturalisation application, which may be necessary in person. Failure to provide this will nullify your pending application.
You will also be be required to arrange your British citizenship ceremony within 90 days of your application being approved.