G326.3$-$1.8 (also known as MSH 15$-$56) has been detected in radio as a middle-aged composite supernova remnant (SNR) consisting of an SNR shell and a pulsar wind nebula (PWN), which has been crushed by the SNRs reverse shock. Previous $gamma$-ray studies of SNR G326.3$-$1.8 revealed bright and extended emission with uncertain origin. Understanding the nature of the $gamma$-ray emission allows probing the population of high-energy particles (leptons or hadrons) but can be challenging for sources of small angular extent. With the recent $textit{Fermi}$ Large Area Telescope data release Pass 8, we investigate the morphology of this SNR to disentangle the PWN from the SNR contribution. We perform a morphological and spectral analysis from 300 MeV to 300 GeV. We use the reconstructed events with the best angular resolution to separately investigate the PWN and the SNR emissions, which is crucial to accurately determine the spectral properties of G326.3$-$1.8 and understand its nature. The centroid of the $gamma$-ray emission evolves with energy and is spatially coincident with the radio PWN at high energies (E $>$ 3 GeV). The morphological analysis reveals that a model considering two contributions from the SNR and the PWN reproduces the $gamma$-ray data better than a single-component model. The associated spectral analysis using power laws shows two distinct spectral features, a softer spectrum for the remnant ($Gamma$ = 2.17 $pm$ 0.06) and a harder spectrum for the PWN ($Gamma$ = 1.79 $pm$ 0.12), consistent with hadronic and leptonic origin for the SNR and the PWN respectively. Focusing on the SNR spectrum, we use one-zone models to derive some physical properties and, in particular, we find that the emission is best explained with a hadronic scenario in which the large target density is provided by radiative shocks in HI clouds struck by the SNR.