From Esri's documentation and Zandbergen's Python Scripting for ArcGIS Pro book, it seems that
geoms = arcpy.management.CopyFeatures(in_fc, arcpy.Geometry())
(where in_fc is some input feature class) should write the geometry objects in the input feature class to memory, not a new feature class. This appears to be the case when running the code from a Jupyter Notebook in the browser or a .py file, but it writes out a new feature class if run from an ArcGIS Notebook in ArcGIS Pro (v 3.0.3). In this case, instead of containing the geometries, the geoms variable will contain the path to the new feature class as a string.
Similarly, the same sources suggest something like
hillshade = arcpy.sa.Hillshade(input_dem)
should also just write output to memory until the save method is called. However, this code also creates a new raster when run from a Notebook in Pro.
There seems to be some subtly to this that I'm missing. Can anyone shed some light on this? Is this expected behavior? Is there some setting I need to change to avoid producing a bunch of intermediate output?