I would emphasize the following items to maximize outcomes or maintain optionality for both quant finance and tech jobs:
1. If you are working in finance, work at a place where technology is a first-class citizen and strategic priority. Many of not most firms in finance do not invest in software the way a Google, Meta, or venture-funded tech startup would and run the business on old, legacy software with weaker development standards. Investment banks are bureaucratic, highly regulated, and would fall in this group as would many large asset managers. Many HFTs and quant hedge funds are much stronger with tech and employ many people from FAANG+ tech companies (and also lose people to these tech companies). Firms like Jump, HRT, Citadel, Jane Street, Two Sigma would be in this group. Your employability in tech will suffer if the programming languages and software frameworks you use in your job are far from the cutting edge.
2. Work on projects which advance and demonstrate your skills in core, more general data science and machine learning and data analysis applications. Pricing derivatives using PDE or doing classic factor investing is unlikely to help much here. There are increasing applications of machine learning (including deep learning and reinforcement learning) in finance including the research of Bryan Kelly, Marcos Lopez de Prado, Gordon Ritter, and Blanka Horvath. I also follow Vivek Viswanathan on LinkedIn and he does a good job outlining his evolution from a traditional factor quant to an ML quant while stressing the importance of solid software development and data management practices. Many finance firms will have teams focused on data science and machine learning which operate in a similar way to those at tech companies and can be great places to work. With the proliferation of new, "alternative" data sources also comes a need to handle less structured data, e.g. text, in a way which is most suited for ML techniques.
3. Write production code. I have interviewed many people for both quant and data science jobs, and a poor grasp of CS fundamentals and lack of programming experience is the most common deficit I see. Many quant and DS jobs do not require you to write production code, but your impact and opportunities will be much higher if you can.
While investing and trading is fundamentally about liquidity provision and/or managing a portfolio, tech is (mostly) about building a tangible product. It is hard to develop tech product intuition working in finance, but you can build this on the job in tech.