Inverse design of the multimode Bragg grating based on time-domain layer peeling method