Why it is said that DTC (Diagnostic Trouble Code) should not be checked when the engine is running?
In the two links you provided in comments, it states to plug in your code reader, turn the ignition on, but don't start the engine, then read the codes. It's not telling you "cannot run the engine" while reading the codes, it's just saying not to do it to read the codes at first.
There should be no issue using your code reader and checking DTCs with the engine started. I've done this many times with multiple different readers without ever having an issue with the vehicle I'm reading of the reader itself. One of the things most code readers do today is check live data. You cannot check live data without the engine running (well, you can, but it won't be "live data").
There are a lot of reasons why you might want to keep checking the vehicle, leaving the scanner plugged into the OBDII port and scanning for DTCs. One of them is vehicle readiness ... to see if the vehicle will pass emissions muster. Another reason is to see if a code comes back after clearing it. This is a typical diagnostic approach when trying to figure out an issue with a vehicle.
I have read my code reader instructions yesterday and it mentions that the DTC's can be read with the ignition on with the engine running or not - handy as I had the engine running at the time...
What it did say was that you should not connect the reader with the engine already running - which I found out after I had done exactly that... Seems fine so i must have been lucky.
However, this could be specific to your reader...