Raw files have no inherent DPI. They just have total pixel dimensions.
ACR assigned a default DPI of 240 (I think now it’s actually 300) so Photoshop will know the image’s DPI (Photoshop has some simple resize & print functions that rely on an image having a DPI). You can change an image’s DPI in ACR by clicking where the DPI is displayed at the bottom of the ACR window. You can also change the color space & bit depth. Any changes you make to DPI, color space, & bit depth that are eventually fully opened in Photoshop will be used for future images opened in ACR.
Similarly, Lightroom’s default export DPI is 240, but it’s an arbitrary default that does not effect the final image. You can change it to whatever you want in the Export options.
But honestly, in the end DPI does not matter unless you are printing, and changing an image’s DPI does not change the image’s pixel data; it just specifies how many pixels are printed per inch.