A humpback whale has become beached on a sand bank in shallow water at Port Kennedy in Perth's southern suburbs.