Hi,
I have experience for 15+ years in electronics/embedded development.
In my point of view, there's 2 ways to implement your project, both using RF: one not accurate at all in terms of distance, and other very accurate in terms of distance/positioning.
In both cases, I propose using LoRa radio modules that can handle long range radio communications. As the microcontroller, I suggest any arduino compatible MCU/board for simplicity in replicating the setup on your side.
1. Distance not accurate at all:
One transmitter and one receiver, where the transmitter periodically transmits packets (the payload doesn't matter at all), and the receiver keeps checking each packet RSSI level to estimate a gross distance between TX and RX and if below distance threshold, signals the alarm.
2. Accurate distance and positioning:
One transmitter and one receiver, both with LoRa and GPS modules, where the transmitter periodically transmits packets with its GPS coordinates to the receiver, that checks the difference between its coordinates and the ones received and if below distance threshold, signals the alarm. This will be as accurate as the GPS signals allow (usually up to 1 meter).
For any of the 2 options, I propose using a readily available ESP32 development board with OLED display for easier debug and testing (show RSSI and/or GPS coordinates and distance between modules).
I can easily complete your project!
If you are interested in my bid, I'm available to chat.
Regards