arcpy.da.Describe seems to put a lock on the layer in a geodatabase. The only way to remove it seems to be closing the script. This doesn't work for me, because I need to gather info from the Describe function, and then depending on the results, move / delete the geodatabase in the same script. I tried deleting the results from the Describe function after I no longer need them, but it's just a dictionary, so it doesn't help.
Here's the basics:
aprx = arcpy.mp.ArcGISProject(path)
m = aprx.listMaps()[0]
lyrs = m.listLayers()
lyr = lyrs[0]
info = arcpy.da.Describe(lyr) # now there's a lock on the feature class that won't go away
# do some other fancy stuff here...
arcpy.management.Delete(gdb_path) # fails because there's a lock on the fc