Remove the log shipping configuration on the secondary server, when the primary is no longer available
You are facing what is called orphaned entries in logshipping tables in msdb. You can use below tsql to just manually clean up logshipping orphan entries. For your case, since you don't have the primary database available, you should just run the secondary part or you can try running sp_delete_log_shipping_secondary_database N'secondary_database'. It will just remove the secondary database settings from msdb.

----- on primary
delete from [dbo].[log_shipping_monitor_primary]
where primary_database = 'your database name'       -- Change the database name 
go
delete from [dbo].[log_shipping_primary_databases]
where primary_database = 'your database name'        -- Change the database name
go
delete from [dbo].[log_shipping_primary_secondaries]
where secondary_database = 'your database name'      -- Change the database name


----- on Secondary
delete from [dbo].[log_shipping_monitor_secondary]
where secondary_database  = 'your database name'     -- Change the database name
go
delete from [dbo].[log_shipping_secondary]
where primary_database = 'your database name'        -- Change the database name
go
delete from [dbo].[log_shipping_secondary_databases]
where secondary_database = 'your database name'      -- Change the database name


Note: Above methods are safe and will delete ONLY logshipping related information.