One step at a time, right? So now you’ve solved the problems that were throwing exceptions. Now you just have incorrect outputs. So you still have more debugging to do.
Look at the shape of your AL value: it is 3 x 4, right? That is wrong. There is only 1 neuron in the output layer so it should be 1 x m. In this test case, the number of samples is 4, so AL should be 1 x 4. So now you need to figure out how that happened.
The best way to get a handle on this type of problem is to start with the “dimensional analysis”. Here is a thread that shows that for the “2hidden” test case here. Please have a look at that thread and then start by putting print statements in your code to show the dimensions of A^{[l]} for all layers. That should give you someplace to start in figuring out what is wrong here.