Alt+3 no longer types ‘#’, types ‘£’ instead
The only keyboard layout that has Alt3 as hash # is the one called British: all others have Shift3
So you need to change the input source to British.
Note most developers have the opposite issue and want to match US and all Windows and Unix keyboards to have Shift3 as #