You stop being a New Zealand tax resident only if you both have no permanent place of abode in New Zealand and are away for more than 325 days in any 12-month period. A place where you usually live counts, and you need not own it. New Zealand and Malaysia have a tax treaty in force, but no social security agreement. Malaysia taxes employment exercised there even when you are paid from abroad, and you are resident there after 182 days.
More detail
The treaty was signed in 1976 and has been in force since 2 September 1976, amended by protocols in 1994 and 2012. In the 1976 text, if both countries treat you as resident, the tie-break looks at your permanent home, then your habitual abode, then where your personal and economic relations are closer. Pay for personal, including professional, services done in Malaysia can be taxed there, but is exempt if you are there no more than 183 days in the year, that time is not part of a continuous period over 183 days, and the payer is a New Zealand resident whose Malaysian permanent establishment, if it has one, does not bear the cost. Each country credits the other's tax paid under the agreement, within its own credit rules.
MDEC's tax table cites Article 14 of the double tax agreement for remote workers who stay 61 days or more. In the 1976 text, Article 14 covers governmental functions and personal services are in Article 11, so MDEC's reference does not fit it. Ask LHDN, whose Hasil Careline MDEC names for tax questions, which rule applies to you.
You become overseas-based for your student loan if you are in New Zealand 31 days or fewer in a 184-day period, and the loan then stops being interest-free from the day after you left; repayments then follow your loan balance, not your income. Only the reasons Inland Revenue lists (such as study, volunteering, being sent abroad for work or going with a partner who qualifies) keep a loan interest-free, and you can ask for a temporary repayment suspension of up to 12 months, though interest still builds.
Malaysia is not on New Zealand's list of eleven social security agreements. Malaysian schemes are tied to employers in Malaysia: contributions for non-Malaysian employees with a valid passport and work pass are mandatory from October 2025 wages, at 2% from the employer and 2% from the employee, when the employer is registered in Malaysia, and SOCSO employment injury cover costs the employer 1.25%. Malaysian residents pay rates up to 30%, and non-residents a flat 30% with no reliefs; ask LHDN for the 2026 rates.