Quick answer - depends.
Basically when you join you sign a contract (S3049) which says you are content with your chosen trade & understand you cannot transfer after joining.
If however the branch you are serving in has a manpower surplus, the branch you wish to transfer to has a manpower shortfall, then manning clearance can exceptionally be granted without a break in service. Be aware it's rare.
The advice is that you should not join in the expectation of being able to transfer & are strongly advised to join in your chosen trade.