Pretty sure System.Diagnostics.Debugger.IsAttached detects only managed debuggers, whereas the code you mentioned CheckRemoteDebuggerPresent, should work on any kind of debugger, provided there is no anti-anti-debugging protection applied.
Managed debuggers, refer to those such as your .net managed debugger.
Note that CheckRemoteDebuggerPresent, when the ...
I'm not able to comment, so i'll just answer here.
If you have to perform the unpacking manually, you should ask yourself - to what extent do you need it unpacked? What are you trying to achieve with the unpacked file?
More often than not, you don't need it fully unpacked, such that it looks similar, if not the same, as the original file.
In any case, with ...
x64dbg can load the pdb and list all the function names if you have pdb for your executable
view->modules->download symbols for this module
also x64dbg can use the source file (ctrl+shift+s)
just for completion sake windbg usage
:\>cdb -c ".lines;bp `winchk.cpp:17`" winchk.exe
Microsoft (R) Windows Debugger Version 10.0.17763.132 AMD64