Soliton formation in an exciton-polariton condensate at a bound state in the continuum