If the relevant stock market measure is the top 100 shares the value of the markets have been affected not just by the UK leaving the EU, but by the nature of the companies that make up the indicies. The UK FTSE100 has a lot of banking type companies and oil/gas companies, sectors that say over the the last 10 years have struggled a bit. I am not an expert on French listed companies, but I tend to think about consumer goods and luxury goods companies like L'Oriel and LMVH.
The drop in the value of the £ would have had an effect too, but people could say it has weakened against the Euro, purely because of Brexit. For many years it seemed over valued against the Euro and seems to be at a realistic level now.
Internationally the UK market had been seen as cheap for a while now. The main European markets are not seen as radically different. There is more political instability in the UK which is a negative. Based on size and history I would expect the UK and France to have very similar size stock markets.
The US market is one that has done particularly well, because it has a lot of tech companies (Apple, Google, Amazon, Meta, Tesla, Microsoft, Netflix). Other attactive markets are some of the Asian markets such as South Korea, Singapore, even Vietnam.