Answer
Check whether the Oracle Profile assigned to your database user has its IDLE_TIME parameter set to around 3 minutes — Oracle's PMON background process periodically terminates sessions that have been idle longer than their profile's IDLE_TIME value, and the disconnect is only actually noticed the next time you try to use that session (run a new statement) after the timeout has already passed, which can make it look like a random, delayed disconnect rather than an immediate one. If changing the database profile's IDLE_TIME isn't something you control or want to change, PL/SQL Developer has a built-in 'Check Connection' feature that periodically pings the database (roughly every 60 seconds) to keep the session active — enabling that avoids hitting the idle-timeout disconnect without needing any database-side change.