I connected my wallet (metamask) to a few dex platforms to buy and sell some tokens and after every successful transaction I always disconnect but yesterday I decided to check the security option and I found a dex still connected.
How did you disconnect? was it just by closing metamask and the web page tab or did you click on "log out" from your account's settings?
If it's the former then the dex is probably using cookies to log you to your account but all it can do is to view your address. So, it's not really a big issue, just clear your browser cache and cookies from your browser and from metamask (
Settings -> Security & Privacy -> Clear privacy data)
1. Dex aren't safer than cex because with cex you only need to send out your token to the cex address, no connection to the platform which I still believe it's easier to lose your funds this way.
By sending your coins to CEX you are no longer the real owner of those coins. So no, it's not safer.
2. There can easily be some back code or hack in future that can bypass and steal coins after several connections to trusted dex exchanges before
As long as you are connected to a legitimate website and check any transaction before confirming it, you should be fine.
3. If you intend to keep tokens for a long time it's safer to stay away from dex, better to send the tokens to cex exchange, your wallet will be safer this way.
The safest way to store your coins for long time is to store them in an offline wallet. You should avoid storing on centralized exchanges at all costs.