Problem internal partition macOS high sierra
You made partition 2 type 53746F72-6167-11AA-AA11-00306543ECAC. You should have made partition 2 type 7C3457EF-0000-11AA-AA11-00306543ECAC.

The commands to change the type are given below. I assume you are entering the commands from macOS Recovery or from a installation flash drive.

gpt remove -i 2 /dev/disk0
gpt add -i 2 -b 409640 -s 781050984 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0


Update:

Do the following to make macOS the default.

Hold down the control key when you choose Untitled.

I am not sure what you did to merge the 100 GB partition back to the APFS container. This was in explained in my answer. However, the results you posted in your update look good.