I guess you mean that if Japan will let you in, Australia will let you out?
Because for Japan, you can leave any time you like. Whether you'll be let into another country is the issue. For example, some countries require a COVID test before you leave Japan. This may be an issue in some areas of Japan, but for me, I would only have to walk 100m to my doctor's surgery to get a PCR test.
So BEFORE leaving Australia for Japan, you need to determine if you can get a PCR or antigen test before leaving Japan. (...if you can and where. For example, I KNOW they've opened up clinics for tests in Tokyo, so you could fly to Tokyo, get the tests and stay a couple of nights, before returning to Australia)