As long as the arrow has enough space to properly clear the bow, that is, for the string to transfer maximum energy to the arrow; which is somewhere less then an arrow length from the bow, the arrow will have better penetration the closer the target is.
Although long range shots when fired upwards are also effective (not AS effective as point-blank shots) because you transfer kinetic energy to potential and then back, with losses due to aerodynamic drag naturally.