Transmission microscopes have become a valuable tool for hard X-ray imaging. They allow even complex in situ and operando setups to be realized. However, the objective lens, typically a Fresnel zone plate with a high numerical aperture, is commonly a limiting factor. The small working distance as well as the low efficiency of Fresnel zone plates with high numerical apertures restrict setups either to accommodate specific sample environments or to provide high resolution. Lensless imaging techniques, e.g. ptychography, do not suffer from such adverse effects of Fresnel zone plates. Consequently, they are frequently used for high-resolution X-ray imaging. A recently developed method, X-ray Fourier ptychography aims to combine the benefits of both techniques. It has been shown to provide quantitative high-resolution imaging whilst keeping large working distances for in situ and operando setups. This is achieved by acquiring multiple images with a full-field transmission microscope, each at a different lateral position of the Fresnel zone plate. Moving the objective off the optical axis varies the frequency content for the acquisitions. The resulting dataset is numerically combined using well-established phase retrieval algorithms to recover a complex-valued representation of the sample. Here, we demonstrate how Fourier ptychographic phase retrieval can further be used to mitigate artifacts caused by samples that were placed out of focus, as well as misaligned optical elements. Employing a similar approach to increase the contrast in case of weakly absorbing specimens is also envisioned.