It depends how the program that has the document open has locked the file (if at all).
Some programs load some files into memory entirely and then close the files. (Or they might make a copy and open that.) With those, the file is not technically open in anything and nothing prevents it from being deleted.
Some keep the file locked and may only read parts of it at a time, so they need the file to remain around and block it from being deleted.
There isn't a warning about files being open when you try to delete them; there is an error message if you try to delete a file and it fails because another program has locked the file such that it cannot be deleted.
There is also a third possibility where a program keeps a file open, but also tells Windows that it's OK to delete the file. If something (e.g. Opus or File Explorer) then asks to delete the file, the deletion will succeed and there is no error, but the file will still be there until the other program closes it. That situation is fairly rare, but there is some software which opens files in that way. That might be what you are seeing.
All of this is unrelated to file types (PDF, Word Doc, etc.). It's entirely down to how and whether the file is being held open and locked by other software when you ask to delete it.