The deleted SD card photos are moved to the Trash and can only be viewed when the SD card is connected to your Mac.
Unlike trashing files from external storage devices on Windows, which permanently deletes the files, macOS will first move the deleted files to Trash, allowing you to put them back within a period of time. So, the space isn't actually freed until you empty the Trash while the SD card is connected.
Also read:
How to Permanently Delete Files & Folders on MacBook Pro/Air
How to Fix SD Card Says Full But Nothing on It on Mac & Windows?
How to Format SD Card to FAT32 on Mac?