You have to check with Messenger and/or TikTok on how to remove the photos from those apps that you have used to send/receive the photos. It was not iOS 18.5 that changed any behavior in those apps, but those apps certainly could have had an update themselves that changed its behavior. Take Messenger for example, it has been updated 11 times in just the last month. App updates happen in the background by default and you don't even know they were updated unless you pay attention to the small blue dot that appears next to the app icon after it has been updated.
If you have a problem with an app not working correctly, then it is the developer of the app that will need to provide an update to resolve a problem. Apple cannot do that.
And again, deleting photos from the Photos app will not remove the photo from any other app that has saved that photo, for example if it was sent to another person. No app has permission to delete data from another app because they are all sandboxed in their own workspace.