We too have found this same issue with rectangle and line graphic elements not exporting. We have found the python code works as a work around, but will be telling staff not to upgrade until this is fixed (and reverting other installs to 2.6).
A tip for those unsure about python use, if you only want to export a single layout in your project, enter the layout name between the brackets (and inside " ") on line 4 as per my added instruction below;
##Export to PDF
aprx = arcpy.mp.ArcGISProject("CURRENT")
aprx.listLayouts()
for lyt in aprx.listLayouts(): #**** ENTER THE LAYOUT NAME YOU WANT TO EXPORT INTO THE BRACKETS i.e. for lyt in aprx.listLayouts("Layout Name"):
#Parameters: output name, resolution, image quality, compress vector graphics, image compression, embed fonts, layer attributes, georeference, jpeg compression, clip to elements, output as image, embed color profile
#Image quality: "BEST", "BETTER", "NORMAL", "FASTER", "FASTEST"
#Image compression: "ADAPTIVE", "DEFLATE", "JPEG", "LZW", "NONE", "RLE"
#Layer attributes: "LAYERS_ONLY", "LAYERS_AND_ATTRIBUTES", "NONE"
lyt.exportToPDF(f"C:\Temp\{lyt.name}.pdf", 150, "NORMAL", True, "ADAPTIVE", True, "LAYERS_ONLY", True, 80, False, False, False)
print("Done")
Lindsay Raabe
GIS Officer
Forest Products Commission WA