I used to use 538, too, but some applications such as Google's Photo Scan will report as not compatible in the Play Store. However, using DPI of 560 makes it compatible. Seems like 560 is a more compatible DPI.
In this case, you have two choices:
1) Install Xposed Framework appropriate for your rooting method, and then install Xposed module named App Settings. Activate App Settings in Xposed, find PhotoScan, adjust it to a DPI that it can work at, and then restart your phone for the settings to become effective. For SuperSu System mode, you can use the official Xposed Framework. For MagiskSU, you can use Systemless Xposed Framework by
@topjohnwu. As for Systemless SuperSU, you have no options AFAIK
2) Head over to apkmirror.com, look for PhotoScan by Google, download & install it. The latest version works at 538 DPI in my phone.
For me, Xposed Framework + App Settings module is the preferred method because a few apps such as LG Camera app also get affected by the phone's DPI setting, so I adjust them to stock DPI (640) using the aforementined combo right after installation is completed. As for your case, you can do whatever you do. Whatever you do, I hope everything goes well for you. Good luck!
