If you have booked through Pegasus directly it should be fine. If you have booked with a third party via skyscanner and it said, self transfer, maybe not. You would then have to collect luggage at Istanbul and check in again.
If you get 2 boarding cards at Dalaman on check in, you will be in transit and your luggage will go through at Istanbul.