MAGNUM survey: A MUSE- Chandra resolved view on ionized outflows and photoionization in the Seyfert galaxy NGC1365