Integrated Photonic Topology Optimization with Nonvertical Sidewall Profiles: Applications in Lithium Niobate and Silicon | Synapse