There shouldn't be much difference between running this as a 64-bit Python script (64-bit Background Geoprocessing) and running it within Pro.
Given the size of the raster, and the fact that the ArcSDE API reads in tiles, not rows, constructing a cache for the tile height might have caused memory issues in 32-bit clients. Re-loading the raster with a W*2 x H/2 tile size might help for borderline cases, depending on the original tile Width & Height. Changing the tile size to be small enough to reside in-row might also result in significant performance improvement, as would using file-based storage (using rasters in databases was novel at ArcGIS 9.0, but is most of the way toward deprecated now).
In the future, please include image and tile dimensions in the question, since storage doesn't provide an indication of width, height, depth, or compression algorithm.
- V