If you apply for a new visa before your current visa expires, you will usually be granted a Bridging visa A. (BVA) Your BVA will keep you lawful in Australia when your current visa expires. You should not leave Australia on your BVA, your BVA will end when you leave, and you will not be allowed to re-enter. If you want to leave and re-enter Australia, you must apply for a Bridging visa B (BVB) after you have been granted the BVA.
You should be mindful with your visa expiry dates and conditions well before you decide on a new visa. Your options for applying for a new visa will be limited if your last visa has already expired. Then you will be considered unlawful if you remain in Australia without a valid visa.