In the program I receive the data in a format of report NMEA. As I can obtain the data in format UBX. whether it is possible
I don’t think that is possible in internal mode. Apart from the the unsolocited NMEA messages you can send raw date with +WGPSRAW command, so you may tune the gps device wiht ubx commands.
In external mode you can use the gps device as a full u-blox TIM (LR) module on UART2.