Framing at inside corners is often inadequate or lacking altogether, making it impossible to fasten the edge of the drywall (left). The solution is to inspect the framing before you start hanging drywall. Make sure there's at least 1 in. of exposed framing at corners. If not, add another 2x4 alongside the existing framing (right).
Especially check along the top of walls that run parallel to the ceiling framing. Normally blocking is nailed to the top plate of the wall during the framing phase, but it's often missing. If you have to add blocking and don't have room to swing a hammer, drive screws into the blocking at an angle from below.