If it’s all on one ticket you don’t have to clear immigration in KUL, and even if it’s not all on one ticket I suspect you can do OLCI or get a boarding pass from the transfer desks, providing you do not have checked luggage to deal with
you’ll have to clear immigration leaving Indonesia and then again when reentering Indonesia though