Hi Max,
According to the [guide|143705|iPad mini 5 Wi-Fi Screen Replacement|new_window=true] guide here on iFixit, the magnetic sensor is needed for the sleep/wake function when you open and close the lid. Apparently significant soldering skills are required in order to transfer that sensor from the old screen to the new one, so I'd strongly recommend getting the one with it already installed. Here's the relevant passage of interest.
[quote]***Some replacement screens don't come with a magnetic sensor installed.*** Without a magnetic sensor, the iPad won’t be able to sleep and wake when using a Smart Cover. It may also cause the power button to not be able to sleep and wake the iPad. AssistiveTouch may also lose its sleep and wake functionality. Without a magnetic sensor, holding down the power button to prompt the power off slider will still wake the screen. The home button will also still wake the screen.
***Transferring the magnetic sensor requires advanced soldering skills.*** The magnetic sensor cable is soldered to the screen.[/quote]
And you will definitely need to carefully transfer the home button from the old screen; if you damage it you can probably replace it but you'll lose the Touch ID function; only Apple can restore that capability and they won't touch it if the screen's been replaced.