Courts of law should decide if your money is legal or not. Not private entities such as banks. This is actually a case for cryptocurrencies and central bank digital currencies.
Ciro Santilli had a fun mini-case of this with his Barclays account frozen for a few days in 2024 in the UK after receiving a large anonymous cryptocurrency donatio: Barclays regulation.