Yes, deleting a file doesn’t destroy the data, until it is overwritten by other data.
This is true for anything using files: computer, camera, phone, usb drive…
The entry disappears from the file listings, but the data stays on the raw medium.
For more details on why it’s difficult to get pictures back : TWRP deliberately disabled mounting the data partition over USB, because its formatted in ext4. No prob with linux and I guess Mac, but on Windows mounting an ext4 partition will give a prompt to the user suggesting him to format the partition !! very dangerous… so they stuck to MTP, which allows file transfer but no raw access.
Source : https://twrp.me/faq/datamedia.html
Because the “internal sdcard” is not a true FAT file system, you can’t
mount it via USB storage. Well, that’s not technically true, but the
vast majority of people use Windows computers and Windows doesn’t
recognize ext4. If we were to allow you to mount the data partition via
USB storage, Windows would claim that the device wasn’t formatted and
offer to format it for you, which, as you can imagine, would be a
disaster. The whole ext4 setup is another reason that Android switched
to using MTP for transferring files. Most of these devices don’t have
the necessary kernel configuration to even support USB storage mode, so
it’s not very easy to enable USB storage if we even wanted to try. With
TWRP 126.96.36.199 and higher, we now support MTP. MTP is the protocol most
newer devices use to transfer files on your PC. If for some reason MTP
is not working for you or if you’re using an older version of TWRP, you
can use adb to push and pull files to and from your device.