You can get the true ending by first 100% completing the map. Make sure you're at 99% completion before you attempt the main boss. Don't worry if you've defeated the main boss, like other metroidvania games, it will simply take you back to the save point before you entered.