If you have a door or window with a crack on either side traveling up to the ceiling, there’s probably a drywall butt joint behind it. Installers aren’t supposed to seam drywall at the end of doors, but sometimes they do. Houses settle, and wood expands and contracts, and that area is very susceptible to cracks. A taped joint just isn’t strong enough to handle the stress. Patch the crack and it’ll nearly always show up again. The only real fix is to cut out the drywall and put in a solid sheet spanning the crack-prone zone. The materials are inexpensive, and the job takes about eight hours (spread over a few days). Sure, you’ll have to repaint, but you have to do that anyway, every time you repatch.
Start by cutting out the cracked drywall (Photo 1). Then cut all the way through the taped joint at the ceiling. Remove the old pieces of drywall and any exposed screws and nails. Cut a single sheet of drywall to match the new opening. Screw the new sheet into place (Photo 2). Then clean up all the cut edges (Photo 2). Tape and mud the new seams using paper tape and lightweight joint compound (Photo 4). To avoid repainting and patching against the ceiling, “flat tape” that seam by embedding tape in the mud against the surface (Photo 4).